Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dc: try to fix dataset_stats for DataChain.from_storage() generated dataset #151

Merged
merged 1 commit into from
Jul 23, 2024
Merged

dc: try to fix dataset_stats for DataChain.from_storage() generated dataset #151

merged 1 commit into from
Jul 23, 2024

Conversation

skshetry
Copy link
Member

No description provided.

@skshetry skshetry requested a review from rlamy July 23, 2024 10:44
@@ -390,7 +390,9 @@ def dataset_stats(
expressions: tuple[_ColumnsClauseArgument[Any], ...] = (
sa.func.count(table.c.sys__id),
)
if "size" in table.columns:
if "file__size" in table.columns:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a temporary solution. from_storage supports object_name other than file which is just the default.

Let me know if you can think of any other solutions, @rlamy.

Copy link
Contributor

@rlamy rlamy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's probably the best we can do as a quick fix. dataset_stats doesn't really fit the new model...

@skshetry
Copy link
Member Author

@skshetry skshetry merged commit 16aaa37 into iterative:main Jul 23, 2024
11 checks passed
@skshetry skshetry deleted the fix-dataset-stats-from-storage branch July 23, 2024 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants