Skip to content

Add ARROW_VERSION const to arrow-array - #10957

Merged
Jefffrey merged 1 commit into
apache:mainfrom
ylw510:feat/arrow-array-version-const
Sep 2, 2026
Merged

Add ARROW_VERSION const to arrow-array#10957
Jefffrey merged 1 commit into
apache:mainfrom
ylw510:feat/arrow-array-version-const

Conversation

@ylw510

@ylw510 ylw510 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

The top-level arrow crate already exposes ARROW_VERSION via env!("CARGO_PKG_VERSION") (see #6379). Dependents that only use arrow-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 invoking cargo metadata in a build script to report DriverArrowVersion.

That approach is fragile for non-Cargo build systems and adds unnecessary clean-build overhead. Exposing the same constant from arrow-array makes version reporting trivial for everyone implementing Rust ADBC drivers (and any other crate that depends on arrow-array without the umbrella arrow crate).

What changes are included in this PR?

  • Add pub const ARROW_VERSION: &str = env!("CARGO_PKG_VERSION") to arrow-array, matching the existing constant on the top-level arrow crate.

Are there any user-facing changes?

Yes: a new public constant on arrow-array. No breaking changes.

Usage:

use arrow_array::ARROW_VERSION;

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.
@github-actions github-actions Bot added arrow Changes to the arrow crate arrow-array labels Sep 2, 2026
@ylw510

ylw510 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

Related: ClickHouse/adbc_clickhouse#69

@Rich-T-kid Rich-T-kid 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.

seems simple enough. thanks

@Jefffrey Jefffrey added the enhancement Any new improvement worthy of a entry in the changelog label Sep 2, 2026
@Jefffrey
Jefffrey merged commit c134baf into apache:main Sep 2, 2026
41 checks passed
@Jefffrey

Jefffrey commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

thanks @ylw510 & @Rich-T-kid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arrow Changes to the arrow crate arrow-array enhancement Any new improvement worthy of a entry in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants