-
Notifications
You must be signed in to change notification settings - Fork 802
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
Allow reading Parquet maps that lack a values
field
#6730
base: master
Are you sure you want to change the base?
Conversation
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.
This looks good to me @etseidl -- thanky ou
I also poked around in https://github.com/apache/parquet-testing/tree/master/data for an example of such a file, but it seems like we do not have one.
let out = reader.next().unwrap().unwrap(); | ||
assert_eq!(out.num_rows(), 3); | ||
assert_eq!(out.num_columns(), 2); | ||
// map and list columns should now be equivalent |
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.
So this means the parquet reader will read MAP
without values as an ListArray
-- I think this seems like the intention so 👍
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.
Yes, because an arrow map must have non-null values IIUC.
Correct, which is why the effort in the tests to produce one. I'll try submitting one I have on hand to parquet-testing. |
apache/parquet-testing#63 submitted. Maybe we can hold off on merging this to see if the test file will be accepted. |
Which issue does this PR close?
Closes #1642.
Rationale for this change
The Parquet spec does not require the
values
field of a map to be present, but current readers will error out if this field is missing.What changes are included in this PR?
Changes both the record reader and arrow reader to read a
MAP
lackingvalues
as a list of keys. This matches the behavior of arrow-cpp.Are there any user-facing changes?
No