-
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
Coerce Array inner types #13452
Coerce Array inner types #13452
Changes from all commits
5d109d1
9ddeda1
f353e3f
22414e3
3c9a768
6e0c56b
d169abc
baf99cb
639f236
2691f80
1181abc
306e7fa
18ee213
cb72340
4005c0c
91b468d
a3052be
1692229
5d39c20
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 | ||
---|---|---|---|---|
|
@@ -26,7 +26,7 @@ use arrow_array::{ | |||
new_null_array, Array, ArrayRef, GenericListArray, NullArray, OffsetSizeTrait, | ||||
}; | ||||
use arrow_buffer::OffsetBuffer; | ||||
use arrow_schema::DataType::{LargeList, List, Null}; | ||||
use arrow_schema::DataType::{List, Null}; | ||||
use arrow_schema::{DataType, Field}; | ||||
use datafusion_common::{plan_err, utils::array_into_list_array_nullable, Result}; | ||||
use datafusion_expr::binary::{ | ||||
|
@@ -198,7 +198,6 @@ pub(crate) fn make_array_inner(arrays: &[ArrayRef]) -> Result<ArrayRef> { | |||
let array = new_null_array(&DataType::Int64, length); | ||||
Ok(Arc::new(array_into_list_array_nullable(array))) | ||||
} | ||||
LargeList(..) => array_array::<i64>(arrays, data_type), | ||||
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. I don't think this line was correct. According to the signature, the function output is always a I added a test to illustrate this:
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.
It seems correct 🤔 ? 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. I see. You fix it :) Thanks |
||||
_ => array_array::<i32>(arrays, data_type), | ||||
} | ||||
} | ||||
|
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.
Could you add a comment here explaining why this function is needed -- specifically that it is setting the DataType / field name correctly?