Add ARROW_VERSION const to arrow-array - #10957
Merged
Merged
Conversation
Expose the crate version the same way the top-level arrow crate does, so dependents that only use arrow-array (e.g. Rust ADBC drivers) can report DriverArrowVersion without invoking cargo metadata at build time.
Contributor
Author
|
Related: ClickHouse/adbc_clickhouse#69 |
Rich-T-kid
approved these changes
Sep 2, 2026
Rich-T-kid
left a comment
Contributor
There was a problem hiding this comment.
seems simple enough. thanks
Jefffrey
approved these changes
Sep 2, 2026
Contributor
|
thanks @ylw510 & @Rich-T-kid |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
The top-level
arrowcrate already exposesARROW_VERSIONviaenv!("CARGO_PKG_VERSION")(see #6379). Dependents that only usearrow-array(common for Rust ADBC drivers that need a lean dependency set) currently have no equivalent API, so they may need to fall back to invokingcargo metadatain a build script to reportDriverArrowVersion.That approach is fragile for non-Cargo build systems and adds unnecessary clean-build overhead. Exposing the same constant from
arrow-arraymakes version reporting trivial for everyone implementing Rust ADBC drivers (and any other crate that depends onarrow-arraywithout the umbrellaarrowcrate).What changes are included in this PR?
pub const ARROW_VERSION: &str = env!("CARGO_PKG_VERSION")toarrow-array, matching the existing constant on the top-levelarrowcrate.Are there any user-facing changes?
Yes: a new public constant on
arrow-array. No breaking changes.Usage: