Skip to content

Experimental native Parquet readers unpack dictionaries by default #1707

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

Open
mbutrovich opened this issue May 2, 2025 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@mbutrovich
Copy link
Contributor

What is the problem the feature request solves?

When using native_datafusion or native_iceberg_compat Parquet readers based on DataFusion's DataSourceExec, the schemas that Comet passes in result in dictionaries being unpacked immediately.

Describe the potential solution

Arrow-rs will use a provided schema as a hint, and in the case of dictionary encoded columns, preserve the encoding:
https://github.com/apache/arrow-rs/blob/880be2f0a0b9675d8b42206e70543472a58792aa/parquet/src/arrow/schema/primitive.rs#L91

The challenge is similar to int96, where the native side doesn't really have the Parquet schema when generating the DataSourceExec. We'd either need to pass this from early on the Spark side when the schema is first read, or add a coercion rule to DataFusion.

Additional context

No response

@mbutrovich mbutrovich added the enhancement New feature or request label May 2, 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
Development

No branches or pull requests

1 participant