-
Notifications
You must be signed in to change notification settings - Fork 119
feat!: arrow 57, MSRV 1.85+ #1424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| #[cfg(feature = "arrow-56")] | ||
| #[cfg(feature = "arrow-57")] | ||
| mod arrow_compat_shims { | ||
| pub use arrow_57 as arrow; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this 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
There was a problem hiding this 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; |
There was a problem hiding this comment.
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()) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
|
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 |
cf17bc9 to
ed9f5ef
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
058f892 to
01dfebe
Compare
01dfebe to
12bd863
Compare
| 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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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::{ |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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?
30eb955 to
15a8e68
Compare
What changes are proposed in this pull request?
add
arrow-57feature flag, removearrow-55. also, since arrow 57 MSRV is 1.85 now, we bump from MSRV 1.84 to 1.85This PR affects the following public APIs
arrowflag now defaults to arrow 57 instead of arrow 56, MSRV now rustc 1.85How was this change tested?
existing