-
Notifications
You must be signed in to change notification settings - Fork 114
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
base: main
Are you sure you want to change the base?
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. |
||
| *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)); | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -64,6 +64,7 @@ Status BaseInheritableMetadata::Apply(ManifestEntry& entry) { | |
|
|
||
| if (entry.data_file) { | ||
| entry.data_file->partition_spec_id = spec_id_; | ||
| entry.data_file->data_sequence_number = entry.sequence_number; | ||
|
Contributor
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.
file.setSpecId(specId);
file.setDataSequenceNumber(manifestEntry.dataSequenceNumber());
file.setFileSequenceNumber(manifestEntry.fileSequenceNumber());
file.setManifestLocation(manifestLocation);Suggestion: either add the fields and propagate them now, or leave an explicit |
||
| } else { | ||
| return InvalidManifest("Manifest entry has no data file"); | ||
| } | ||
|
|
||
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.
AppendRowLineageValueis defined verbatim in bothavro_data_util.cc:57andavro_direct_decoder.cc:147with identical logic.