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

[native_datafusion] Add support for reading arrays #1322

Open
andygrove opened this issue Jan 22, 2025 · 0 comments · May be fixed by #1324
Open

[native_datafusion] Add support for reading arrays #1322

andygrove opened this issue Jan 22, 2025 · 0 comments · May be fixed by #1324
Assignees
Labels
enhancement New feature or request

Comments

@andygrove
Copy link
Member

What is the problem the feature request solves?

In org.apache.spark.sql.comet.CometNativeScanExec#isAdditionallySupported we currently return false for Array types, therefore we fall back to Spark's scan if the Parquet file contains arrays.

I tried modifying this method to return true for Arrays as long as the element type is supported and saw this error:

Cannot cast file schema field c13 of type List(Field { name: "element", data_type: Boolean, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }) to required schema field of type List(Field { name: "item", data_type: Boolean, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} })

For readability, the from and to types are:

from: List(Field { name: "element", data_type: Boolean, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }
  to: List(Field { name: "item", data_type: Boolean, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} })

The field name is different but the type is the same, so the cast should be supported (and be a no-op).

Describe the potential solution

No response

Additional context

No response

@andygrove andygrove added the enhancement New feature or request label Jan 22, 2025
@andygrove andygrove self-assigned this Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant