Skip to content

[rust] Expose source schema IDs in Arrow batch scans - #4616

Merged
fresh-borzoni merged 2 commits into
apache:mainfrom
spoon-lz:codex/arrow-batch-schema-id-20261012
Oct 30, 2026
Merged

fresh-borzoni merged 2 commits into
apache:mainfrom
spoon-lz:codex/arrow-batch-schema-id-20261012

Conversation

@spoon-lz

Copy link
Copy Markdown
Contributor

Title: [rust] Expose source schema IDs in Arrow batch scans

Purpose

Fixes #4615

Expose source log batch schema IDs in Arrow scan results, matching the metadata available in the Java client.

Brief change log

  • Add schema ID accessors and NO_SCHEMA_ID in Rust, Python and C++.
  • Preserve source IDs through slicing, projection and schema alignment.
  • Return the sentinel for limit scan results.

Tests

Rust workspace tests (855), Python/C++ binding conversion tests, Clippy, Rustdoc and formatting checks passed. Rust integration tests compiled; live-cluster tests were not run. Full C++ integration-test compilation was blocked by missing nlohmann/json.hpp.

API and Format

Additive metadata accessors; no protocol or storage-format changes. C++ bindings and clients need to be rebuilt together.

Documentation

Updated API reference tables and interface comments.

Generative AI disclosure

Yes — OpenAI Codex was used to prepare the implementation, tests, and validation materials.

Carry the source log batch schema ID through decoding, slicing and the Python and C++ batch bindings. Preserve its identity after projection or schema alignment, and report NO_SCHEMA_ID for batches without a single source schema, including limit scans.

Keep existing constructors and expose additive accessors and named sentinels. Cover historical schemas, per-batch metadata and binding conversion, and document the distinction from the output Arrow schema.
@loserwang1024
loserwang1024 self-requested a review October 14, 2026 02:52

@naivedogger naivedogger left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. Thanks @spoon-lz for this PR. cc @loserwang1024 @fresh-borzoni, any additional thoughts?

@fresh-borzoni fresh-borzoni left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@spoon-lz Thank you, LGTM 👍

pushed tests and missing docs as well, I'll merge once CI is green

@fresh-borzoni
fresh-borzoni merged commit 60e2f34 into apache:main Oct 30, 2026
23 checks passed
@fresh-borzoni

Copy link
Copy Markdown
Member

@spoon-lz merged!
One thing: the commit went in with liuzhuo@xiaohongshu.com, which isn't linked to your GitHub account, so GitHub doesn't count it as yours. If you add and verify that email under Settings > Emails, it'll show up in your contributions.
Your earlier PRs used your other email, so they're fine.

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.

[rust] Expose source schema IDs in Arrow batch scans

3 participants