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

Unable to query partitioned tables #1291

Closed
cmackenzie1 opened this issue Apr 14, 2023 · 3 comments · Fixed by #1303
Closed

Unable to query partitioned tables #1291

cmackenzie1 opened this issue Apr 14, 2023 · 3 comments · Fixed by #1303
Labels
binding/rust Issues for the Rust crate bug Something isn't working

Comments

@cmackenzie1
Copy link
Contributor

Environment

Delta-rs version: 0.9.0

Binding:

Environment:

  • Cloud provider: N/A
  • OS: macOS 13.3.1
  • Other:

Bug

What happened:

Trying to query a partitioned table using datafusion is failing.

What you expected to happen:

Should return the results matching the partition filter.

How to reproduce it:

  1. Create a partitioned table (replicated using https://github.com/delta-io/delta-rs/tree/main/rust/tests/data/delta-0.8.0-partitioned)
  2. Add data to table
  3. Query table using SELECT * FROM t WHERE year = 2020
Internal("The type of Dictionary(UInt16, Utf8) Eq Utf8 of binary physical should be same")

More details:

Trying again where the partition column type is string yields no results and no error. I think the resulting parquet file is missing the partition column as data.

@cmackenzie1 cmackenzie1 added the bug Something isn't working label Apr 14, 2023
@roeap
Copy link
Collaborator

roeap commented Apr 14, 2023

Thanks for reporting, there were some changes in how datafusion handles partitioned columns.

I'll look into it.

@cmackenzie1
Copy link
Contributor Author

Thanks, @roeap. Let me know how I can help. I've started building a project with delta-rs at work, so happy to help out.

I see in datafusion_tests.ts that the value is cast during query. Do you know if type coercion now supported, so the casting can be omitted?

@roeap
Copy link
Collaborator

roeap commented Apr 20, 2023

I've started building a project with delta-rs at work, so happy to help out.

Excellent - we are always happy for any contributions. Very much like you already did with the great test cases!

cmackenzie1 added a commit to cmackenzie1-contrib/delta-rs that referenced this issue Jun 7, 2023
This results in duplicating the same table for delta-io#1291 and delta-io#1292 but
I think the clarity is worth it.
ChewingGlass pushed a commit to helium/delta-rs that referenced this issue Jun 12, 2023
This results in duplicating the same table for delta-io#1291 and delta-io#1292 but
I think the clarity is worth it.
ChewingGlass pushed a commit to helium/delta-rs that referenced this issue Jun 28, 2023
This results in duplicating the same table for delta-io#1291 and delta-io#1292 but
I think the clarity is worth it.
ChewingGlass pushed a commit to helium/delta-rs that referenced this issue Jun 28, 2023
This results in duplicating the same table for delta-io#1291 and delta-io#1292 but
I think the clarity is worth it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
binding/rust Issues for the Rust crate bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants