-
Notifications
You must be signed in to change notification settings - Fork 117
feat: read v3 row lineage metadata columns #822
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,14 +43,18 @@ ReaderOptions MakeReaderOptions(const DataFile& data_file, std::shared_ptr<FileI | |
| std::shared_ptr<Schema> projection, | ||
| std::shared_ptr<Expression> filter, | ||
| std::shared_ptr<NameMapping> name_mapping, | ||
| ReaderProperties properties) { | ||
| ReaderProperties properties, | ||
| std::optional<int64_t> first_row_id, | ||
| std::optional<int64_t> data_sequence_number) { | ||
| return ReaderOptions{ | ||
| .path = data_file.file_path, | ||
| .length = static_cast<size_t>(data_file.file_size_in_bytes), | ||
| .io = std::move(io), | ||
| .projection = std::move(projection), | ||
| .filter = std::move(filter), | ||
| .name_mapping = std::move(name_mapping), | ||
| .first_row_id = first_row_id, | ||
| .data_sequence_number = data_sequence_number, | ||
| .properties = std::move(properties), | ||
| }; | ||
| } | ||
|
|
@@ -161,9 +165,9 @@ class FileScanTaskReader::Impl { | |
| data_file->file_size_in_bytes); | ||
|
|
||
| if (task.delete_files().empty()) { | ||
| auto options = | ||
| MakeReaderOptions(*data_file, io_, projected_schema_, task.residual_filter(), | ||
| name_mapping_, properties_); | ||
| auto options = MakeReaderOptions( | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. REST scan-task JSON appears to round-trip only The row-lineage spec says missing/null Disclosure: I used an LLM to help review this PR and draft this comment.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I looked into the Java REST implementation and OpenAPI. This is not C++-specific: So the failing case is REST-planned scan tasks reading row lineage metadata, where
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed, the fix is beyond this PR. We can create a follow-up issue to track.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I opened apache/iceberg#17234 to address this on the Java/REST side. It preserves
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah ha, you beat me to it ;)
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just let Codex create these to provide me with more detail so I marked them as
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I opened a PR at my own fork but am still reviewing the change. Let me check out your PR and see where we can go from there. |
||
| *data_file, io_, projected_schema_, task.residual_filter(), name_mapping_, | ||
| properties_, data_file->first_row_id, data_file->data_sequence_number); | ||
| ICEBERG_ASSIGN_OR_RAISE( | ||
| auto reader, ReaderFactoryRegistry::Open(data_file->file_format, options)); | ||
| return MakeArrowArrayStream(std::move(reader)); | ||
|
|
@@ -187,8 +191,9 @@ class FileScanTaskReader::Impl { | |
| ProjectionContext::Make(*required_schema, *projected_schema_, | ||
| project_batch_function)); | ||
|
|
||
| auto options = MakeReaderOptions(*data_file, io_, required_schema, | ||
| task.residual_filter(), name_mapping_, properties_); | ||
| auto options = MakeReaderOptions( | ||
| *data_file, io_, required_schema, task.residual_filter(), name_mapping_, | ||
| properties_, data_file->first_row_id, data_file->data_sequence_number); | ||
| ICEBERG_ASSIGN_OR_RAISE(auto reader, | ||
| ReaderFactoryRegistry::Open(data_file->file_format, options)); | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wgtmac Can we add a test that exposes this gap and we skip for now?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also create a follow-up issue and refer it in the comments for the test.