Skip to content

Conversation

@zachschuermann
Copy link
Member

@zachschuermann zachschuermann commented Oct 23, 2025

What changes are proposed in this pull request?

add arrow-57 feature flag, remove arrow-55. also, since arrow 57 MSRV is 1.85 now, we bump from MSRV 1.84 to 1.85

This PR affects the following public APIs

arrow flag now defaults to arrow 57 instead of arrow 56, MSRV now rustc 1.85

How was this change tested?

existing

@nicklan nicklan removed the request for review from scovich October 23, 2025 18:46
@github-actions github-actions bot added the breaking-change Change that require a major version bump label Oct 23, 2025
#[cfg(feature = "arrow-56")]
#[cfg(feature = "arrow-57")]
mod arrow_compat_shims {
pub use arrow_57 as arrow;
Copy link
Collaborator

Choose a reason for hiding this comment

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

we should probably turn off these warnings if they are spurious

Copy link
Collaborator

Choose a reason for hiding this comment

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

The compiler is usually pretty darn accurate. IMO we should figure out why it emitted the warnings instead of just assuming they're spurious.

Copy link
Member Author

Choose a reason for hiding this comment

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

hm maybe they disappeared now? sorry i don't know what messages this comment was linked to haha

Copy link
Collaborator

@hntd187 hntd187 left a comment

Choose a reason for hiding this comment

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

These were the exact changes I made, LGTM

Copy link
Collaborator

@scovich scovich left a comment

Choose a reason for hiding this comment

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

Not sure this is quite ready for merge yet, see comments.

#[cfg(feature = "arrow-56")]
#[cfg(feature = "arrow-57")]
mod arrow_compat_shims {
pub use arrow_57 as arrow;
Copy link
Collaborator

Choose a reason for hiding this comment

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

The compiler is usually pretty darn accurate. IMO we should figure out why it emitted the warnings instead of just assuming they're spurious.

.row_groups()
.iter()
.map(|rg| rg.total_byte_size)
.map(|rg| rg.total_byte_size())
Copy link
Collaborator

Choose a reason for hiding this comment

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

Did these accessor methods already exist in arrow-56, and arrow-57 just took the corresponding fields private? Or do we need conditional compilation here? 

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think they existed - looks like they were just fields in parquet 56. But since this is in the separate (and internal) mem-test crate which selects its own version of arrow (57 now) this doesn't have to support both so I think we are good!

release = false

[dependencies]
arrow = "56"
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should change to "57"? I think the dependency was originally there to ensure we build mem-test with the latest available arrow version?

Copy link
Member Author

Choose a reason for hiding this comment

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

since kernel re-exports arrow I elected to remove this, and we just use the kernel arrow feature flag to pull in the latest arrow version kernel supports

Copy link
Collaborator

Choose a reason for hiding this comment

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

Doesn't kernel pull in arrow-56 OR arrow-57 depending on the flags it was configured with, tho?

Copy link
Member Author

Choose a reason for hiding this comment

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

the arrow feature flag in kernel means "latest arrow" so was using that flag to get the latest arrow that we desire here

@zachschuermann
Copy link
Member Author

Yep definitely not ready to merge haha. thanks for the reviews all! I did some exploration on this a while ago and didn't return to it since. I'll push an update shortly that removes 55

@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.85%. Comparing base (81a8b7d) to head (eff31d2).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1424   +/-   ##
=======================================
  Coverage   84.84%   84.85%           
=======================================
  Files         119      119           
  Lines       31031    31031           
  Branches    31031    31031           
=======================================
+ Hits        26329    26332    +3     
+ Misses       3425     3424    -1     
+ Partials     1277     1275    -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@zachschuermann zachschuermann changed the title feat!: arrow 57 support feat!: arrow 57, MSRV 1.85+ Nov 3, 2025
@zachschuermann zachschuermann force-pushed the arrow-57 branch 2 times, most recently from 058f892 to 01dfebe Compare November 3, 2025 17:18
let res = writer.close().unwrap();

create_file_metadata(file_path, res.num_rows, metadata_schema)
create_file_metadata(file_path, res.file_metadata().num_rows(), metadata_schema)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Coming back to #1424 (comment) --

If these were just fields before, and now they're accessors (that didn't exist before), doesn't that mean this FFI code will fail to compile against arrow-56? The other example was hard-wired to arrow-57, but I thought FFI allowed either one?

Copy link
Member Author

Choose a reason for hiding this comment

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

yep correct this won't work for arrow-56 but FFI specifically takes a dependency on delta_kernel/arrow = latest version of arrow, so we directly switch to the 57 code here without issue

common = { path = "../common" }
delta_kernel = { path = "../../../kernel", features = [
"arrow-56",
"arrow",
Copy link
Collaborator

Choose a reason for hiding this comment

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

We're intentionally pulling in whatever arrow the user configured, instead of forcing arrow-56 (which was latest)? Why do that, instead of forcing arrow-57 (which is now latest)?

(again below)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Update: I see... we just pull generic "arrow" from kernel (with the indirection it implies), but take actual arrow-57 for ourselves. I think that will lead to incompatible arrow versions in practice, as we pass record batches from arrow-56 kernel to arrow-57 example?

Copy link
Member Author

Choose a reason for hiding this comment

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

yep but I was actually using that as a desired behavior: this way, we pull in arrow-57 here in cargo.toml (which we need to do since we enable those other feature flags) and then we just say arrow feature flag for kernel. as we upgrade kernel, this example will break and force us to e.g. bump to 58 whenever we default to arrow 58 in the future. this is instead of the old way which would require us to remember to go update the two numbers (which admittedly isn't that bad but this felt more explicit)

Copy link
Collaborator

Choose a reason for hiding this comment

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

So just to confirm (been a while, I'm forgetting): arrow brings in latest arrow version, unless the older version is also specifically requested?

use crate::utils::test_utils::Action;
use crate::{DeltaResult, FileMeta, LogPath, Snapshot};

use arrow_56::{
Copy link
Collaborator

Choose a reason for hiding this comment

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

huh, I wonder why it used to hard-wire the version like this?
(your change seems like the better way)

Copy link
Member Author

Choose a reason for hiding this comment

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

yea and actually this may highlight a test gap? i don't see how this could have previously compiled with arrow 55..?

release = false

[dependencies]
arrow = "56"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Doesn't kernel pull in arrow-56 OR arrow-57 depending on the flags it was configured with, tho?

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

Labels

breaking-change Change that require a major version bump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants