-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Update DataFusion to arrow 6.0 #984
Changes from all commits
7f6a02e
ef57066
819ce3b
9ab55fb
537552a
95a8c58
b30a35f
4e39f6d
f2b04ad
2899c49
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1970,7 +1970,12 @@ mod tests { | |
let results = | ||
execute("SELECT c1, AVG(c2) FROM test WHERE c1 = 123 GROUP BY c1", 4).await?; | ||
|
||
let expected = vec!["++", "||", "++", "++"]; | ||
let expected = vec![ | ||
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. Required due to apache/arrow-rs#656 |
||
"+----+--------------+", | ||
"| c1 | AVG(test.c2) |", | ||
"+----+--------------+", | ||
"+----+--------------+", | ||
]; | ||
assert_batches_sorted_eq!(expected, &results); | ||
|
||
Ok(()) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,15 +47,17 @@ macro_rules! compare_op_scalar { | |
// same as $left.len() | ||
let buffer = unsafe { MutableBuffer::from_trusted_len_iter_bool(comparison) }; | ||
|
||
let data = ArrayData::new( | ||
DataType::Boolean, | ||
$left.len(), | ||
None, | ||
null_bit_buffer, | ||
0, | ||
vec![Buffer::from(buffer)], | ||
vec![], | ||
); | ||
let data = unsafe { | ||
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. Due to apache/arrow-rs#822 (this can lead to unsafe behavior here if the buffers are not correctly created). The alternate is to use the Thoughts? |
||
ArrayData::new_unchecked( | ||
DataType::Boolean, | ||
$left.len(), | ||
None, | ||
null_bit_buffer, | ||
0, | ||
vec![Buffer::from(buffer)], | ||
vec![], | ||
) | ||
}; | ||
Ok(BooleanArray::from(data)) | ||
}}; | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -963,6 +963,10 @@ mod tests { | |
expr: col("c7", &schema).unwrap(), | ||
options: SortOptions::default(), | ||
}, | ||
PhysicalSortExpr { | ||
expr: col("c12", &schema).unwrap(), | ||
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. |
||
options: SortOptions::default(), | ||
}, | ||
]; | ||
|
||
let basic = basic_sort(csv.clone(), sort.clone()).await; | ||
|
@@ -971,7 +975,11 @@ mod tests { | |
let basic = arrow::util::pretty::pretty_format_batches(&[basic]).unwrap(); | ||
let partition = arrow::util::pretty::pretty_format_batches(&[partition]).unwrap(); | ||
|
||
assert_eq!(basic, partition); | ||
assert_eq!( | ||
basic, partition, | ||
"basic:\n\n{}\n\npartition:\n\n{}\n\n", | ||
basic, partition | ||
); | ||
} | ||
|
||
// Split the provided record batch into multiple batch_size record batches | ||
|
@@ -1183,7 +1191,7 @@ mod tests { | |
async fn test_async() { | ||
let schema = test::aggr_test_schema(); | ||
let sort = vec![PhysicalSortExpr { | ||
expr: col("c7", &schema).unwrap(), | ||
expr: col("c12", &schema).unwrap(), | ||
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. this is needed because |
||
options: SortOptions::default(), | ||
}]; | ||
|
||
|
@@ -1234,7 +1242,11 @@ mod tests { | |
let basic = arrow::util::pretty::pretty_format_batches(&[basic]).unwrap(); | ||
let partition = arrow::util::pretty::pretty_format_batches(&[merged]).unwrap(); | ||
|
||
assert_eq!(basic, partition); | ||
assert_eq!( | ||
basic, partition, | ||
"basic:\n\n{}\n\npartition:\n\n{}\n\n", | ||
basic, partition | ||
); | ||
} | ||
|
||
#[tokio::test] | ||
|
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.
Needed due to apache/arrow-rs#491 -- I am not enough of an expert to implement protobuf serialization in Ballista for a new
DataType
at this time but I suspect it is not very hard