Skip to content

feat(inspect): add shared snapshot metadata scan support - #1120

Open
manuzhang wants to merge 2 commits into
apache:mainfrom
manuzhang:codex/metadata-scan-support-20261115
Open

manuzhang wants to merge 2 commits into
apache:mainfrom
manuzhang:codex/metadata-scan-support-20261115

Conversation

@manuzhang

@manuzhang manuzhang commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Snapshot-backed metadata views need to retain their source metadata and FileIO, derive schemas from captured metadata, and reuse partition and manifest-reading logic. Add the common support needed by the focused FilesTable (#876), ManifestsTable (#1121), and PartitionsTable (#1122) follow-ups.

The scan builder obtains its schema from the captured metadata, and schema() returns shared ownership by value. Generic snapshot tasks retain metadata, projection, FileIO, and a row-reader callback; the task reader opens them without depending on concrete table classes. Shared helpers resolve snapshot IDs/references/timestamps, unify partition specs, project partition values, and read live files one manifest at a time.

The fallible row-stream overload validates its schema, source, callback, and batch size before exporting a C stream. Errors and exhaustion are terminal. Shared utilities are exported for both static and shared library consumers. The common scan fixture and focused regressions cover input errors, lazy batching, repeated failures, task ownership/reopening, projection validation, and partition evolution.

Validation: all 61 metadata tests and the C++20 compatibility test passed in Debug for both static and shared library builds with Arrow/Parquet 23.0.1. Pre-commit and diff checks passed. The complete split composition also passed 132 tests with one expected format-version skip, plus C++20 compatibility.

Capture scan schemas and FileIO, validate projections and snapshot selection, and open generic snapshot tasks without depending on concrete metadata tables. Share partition projection and lazy manifest iteration; validate fallible row stream inputs and terminal state. Add focused support regressions and a reusable scan fixture.

Co-authored-by: Codex <codex@openai.com>
Copilot AI balanced review requested due to automatic review settings November 14, 2026 16:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

Include the Arrow schema definition in the standalone scan fixture and
compare partition child counts with std::cmp_equal without narrowing.

Co-authored-by: Codex <codex@openai.com>
Copilot AI balanced review requested due to automatic review settings November 15, 2026 03:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

This branch has not been deployed

No deployments
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