-
Notifications
You must be signed in to change notification settings - Fork 240
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
chore: upgrade datafusion and arrow-rs #1390
Closed
Closed
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ use std::borrow::Cow; | |
use std::ops::{Range, RangeTo}; | ||
use std::sync::Arc; | ||
|
||
use arrow_arith::arithmetic::subtract_scalar; | ||
use arrow_arith::numeric::sub; | ||
use arrow_array::{ | ||
builder::PrimitiveBuilder, | ||
cast::AsArray, | ||
|
@@ -954,8 +954,9 @@ where | |
} | ||
}; | ||
|
||
let start_position = positions.value(0); | ||
let offset_arr = subtract_scalar(positions, start_position)?; | ||
let start_position = PrimitiveArray::<T>::new_scalar(positions.value(0)); | ||
let offset_arr = sub(positions, &start_position)?; | ||
let offset_arr_ref = offset_arr.as_primitive::<T>(); | ||
let value_arrs = read_array( | ||
reader, | ||
&field.children[0], | ||
|
@@ -964,7 +965,7 @@ where | |
&value_params, | ||
) | ||
.await?; | ||
let arr = try_new_generic_list_array(value_arrs, &offset_arr)?; | ||
let arr = try_new_generic_list_array(value_arrs, offset_arr_ref)?; | ||
Ok(Arc::new(arr) as ArrayRef) | ||
} | ||
|
||
|
@@ -1528,22 +1529,22 @@ mod tests { | |
|
||
let arr = read_array_w_params(&reader, &schema.fields[1], ReadBatchParams::RangeFull).await; | ||
assert_eq!(100, arr.len()); | ||
assert_eq!(100, arr.null_count()); | ||
assert_eq!(arr.data_type(), &DataType::Null); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
let arr = | ||
read_array_w_params(&reader, &schema.fields[1], ReadBatchParams::Range(10..25)).await; | ||
assert_eq!(15, arr.len()); | ||
assert_eq!(15, arr.null_count()); | ||
assert_eq!(arr.data_type(), &DataType::Null); | ||
|
||
let arr = | ||
read_array_w_params(&reader, &schema.fields[1], ReadBatchParams::RangeFrom(60..)).await; | ||
assert_eq!(40, arr.len()); | ||
assert_eq!(40, arr.null_count()); | ||
assert_eq!(arr.data_type(), &DataType::Null); | ||
|
||
let arr = | ||
read_array_w_params(&reader, &schema.fields[1], ReadBatchParams::RangeTo(..25)).await; | ||
assert_eq!(25, arr.len()); | ||
assert_eq!(25, arr.null_count()); | ||
assert_eq!(arr.data_type(), &DataType::Null); | ||
|
||
let arr = read_array_w_params( | ||
&reader, | ||
|
@@ -1552,7 +1553,7 @@ mod tests { | |
) | ||
.await; | ||
assert_eq!(4, arr.len()); | ||
assert_eq!(4, arr.null_count()); | ||
assert_eq!(arr.data_type(), &DataType::Null); | ||
|
||
// raise error if take indices are out of bounds | ||
let params = ReadBatchParams::Indices(UInt32Array::from(vec![1, 9, 30, 72, 100])); | ||
|
This file contains 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
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.
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.
IIRC, we are wait for arrow 47 for a few fixes? And datafusion 32 is being voted at the moment, right?
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.
Why wait? Is something broken in 46?
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.
Do we need to bump
datafusion
again in 3-5 days to include fixes?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.
🤷 yes, we need to upgrade for the next version. IMO we should upgrade on every datafusion release.