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

feat: allow empty projection in table scan #677

Merged
merged 7 commits into from
Oct 25, 2024

Conversation

sundy-li
Copy link
Contributor

@sundy-li sundy-li commented Oct 21, 2024

closes #676

@Xuanwo
Copy link
Member

Xuanwo commented Oct 21, 2024

Failure in CI should be fixed by #678

@sdd
Copy link
Contributor

sdd commented Oct 23, 2024

This looks good to me, thanks! I'm assuming that the reason why someone would want to perform a scan with an empty projection is to get a row count?

Copy link
Collaborator

@liurenjie1024 liurenjie1024 left a comment

Choose a reason for hiding this comment

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

Thanks @sundy-li for this pr, generally LGTM!

crates/iceberg/src/scan.rs Outdated Show resolved Hide resolved
crates/iceberg/src/scan.rs Outdated Show resolved Hide resolved
@sundy-li
Copy link
Contributor Author

This looks good to me, thanks! I'm assuming that the reason why someone would want to perform a scan with an empty projection is to get a row count?

As I described in the issue, select count(0) from t would use empty scan (just need the read the metadata from parquet).

Copy link
Collaborator

@liurenjie1024 liurenjie1024 left a comment

Choose a reason for hiding this comment

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

Thanks @sundy-li , LGTM! Please help to fix ci failure.

@Xuanwo
Copy link
Member

Xuanwo commented Oct 24, 2024

Seems related opendal's new release, I will get it fixed.

@sdd
Copy link
Contributor

sdd commented Oct 24, 2024

@Xuanwo I've got a fix for that build issue here: #680

@Xuanwo
Copy link
Member

Xuanwo commented Oct 25, 2024

Thank you @sundy-li for this work, also thanks @liurenjie1024's review and @sdd for fixing CI, we are fine to merge now.

@liurenjie1024 liurenjie1024 merged commit 11e36c0 into apache:main Oct 25, 2024
16 checks passed
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.

bug: TableScanBuilder should take care of empty projections
4 participants