Skip to content
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

feat: Add array reading support to native_datafusion scan #1324

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andygrove
Copy link
Member

@andygrove andygrove commented Jan 22, 2025

Which issue does this PR close?

Closes #1322

Rationale for this change

Add support for reading arrays from Parquet

What changes are included in this PR?

  • Enable array support in native_datafusion scan
  • Add new test to exercise this support

How are these changes tested?

@andygrove andygrove changed the title chore: Improve array_contains support chore: Improve array_contains support and add array support to native_datafusion scan Jan 22, 2025
@@ -111,7 +111,7 @@ pub fn to_arrow_datatype(dt_value: &DataType) -> ArrowDataType {
{
DatatypeStruct::List(info) => {
let field = Field::new(
"item",
"element",
Copy link
Member Author

Choose a reason for hiding this comment

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

This change was necessary to resolve an error trying to cast List(Field { name: "element", .. to List(Field { name: "item", .. in schema_adapter

@andygrove
Copy link
Member Author

@mbutrovich This PR touches native_datafusion, so I will leave this in draft until you have time to review to make sure I am not introducing regressions

@andygrove andygrove force-pushed the improve-array-contains branch from 307fd19 to 8f10a98 Compare January 31, 2025 14:48
@andygrove andygrove changed the title chore: Improve array_contains support and add array support to native_datafusion scan feat Add array reading support to native_datafusion scan Jan 31, 2025
@andygrove andygrove changed the title feat Add array reading support to native_datafusion scan feat: Add array reading support to native_datafusion scan Jan 31, 2025
@andygrove
Copy link
Member Author

DisableAQECometAsyncShuffleSuite test columnar shuffle on array is failing when calling comet::execution::shuffle::row::builder_to_array due to:

org.apache.comet.CometNativeException: called `Result::unwrap()` on an `Err` value: InvalidArgumentError("Incorrect datatype for StructArray field \"_2\", expected List(Field { name: \"element\", data_type: Int32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }) got List(Field { name: \"item\", data_type: Int32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} })")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[native_datafusion] Add support for reading arrays
1 participant