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

Failed to read empty table #580

Closed
FANNG1 opened this issue Aug 24, 2024 · 0 comments · Fixed by #608
Closed

Failed to read empty table #580

FANNG1 opened this issue Aug 24, 2024 · 0 comments · Fixed by #608
Labels
bug Something isn't working
Milestone

Comments

@FANNG1
Copy link
Contributor

FANNG1 commented Aug 24, 2024

If there are no data in a table, we should return empty values not throw exception.

Error: FeatureUnsupported => Can't scan table without snapshots
@liurenjie1024 liurenjie1024 added the bug Something isn't working label Aug 26, 2024
@liurenjie1024 liurenjie1024 added this to the 0.4.0 Release milestone Aug 26, 2024
mattheusv added a commit to mattheusv/iceberg-rust that referenced this issue Sep 6, 2024
Previously TableScan struct was requiring a Snapshot to plan files and
for empty tables without a snapshot an error was being returned instead
of an empty result.

Following the same approach of Java [0] and Python [1] implementation
this commit change the snapshot property to accept None values and the
`plan_files` method was also changed to return an empty stream if the
snapshot is not present on on PlanContext.

[0] https://github.com/apache/iceberg/blob/main/core/src/main/java/org/apache/iceberg/SnapshotScan.java#L119
[1] https://github.com/apache/iceberg-python/blob/main/pyiceberg/table/__init__.py#L1979

Fixes: apache#580
mattheusv added a commit to mattheusv/iceberg-rust that referenced this issue Sep 6, 2024
Previously TableScan struct was requiring a Snapshot to plan files and
for empty tables without a snapshot an error was being returned instead
of an empty result.

Following the same approach of Java [0] and Python [1] implementation
this commit change the snapshot property to accept None values and the
`plan_files` method was also changed to return an empty stream if the
snapshot is not present on on PlanContext.

[0] https://github.com/apache/iceberg/blob/main/core/src/main/java/org/apache/iceberg/SnapshotScan.java#L119
[1] https://github.com/apache/iceberg-python/blob/main/pyiceberg/table/__init__.py#L1979

Fixes: apache#580
mattheusv added a commit to mattheusv/iceberg-rust that referenced this issue Sep 6, 2024
Previously TableScan struct was requiring a Snapshot to plan files and
for empty tables without a snapshot an error was being returned instead
of an empty result.

Following the same approach of Java [0] and Python [1] implementation
this commit change the snapshot property to accept None values and the
`plan_files` method was also changed to return an empty stream if the
snapshot is not present on on PlanContext.

[0] https://github.com/apache/iceberg/blob/main/core/src/main/java/org/apache/iceberg/SnapshotScan.java#L119
[1] https://github.com/apache/iceberg-python/blob/main/pyiceberg/table/__init__.py#L1979

Fixes: apache#580
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants