fix(parquet/pqarrow): decoding Parquet with Arrow dict in schema - #551
Merged
zeroshade merged 5 commits intoOct 28, 2025
Merged
Conversation
Contributor
|
Thanks for the fix and reproducer @freakyzoidberg ! I confirm that running your branch on the file I mentioned in #546 now doesn't return the |
zeroshade
requested changes
Oct 28, 2025
zeroshade
left a comment
Member
There was a problem hiding this comment.
Only one critique, everything else looks great! 😄 Thanks!
Comment on lines
+41
to
+52
| // DictionaryState tracks the lifecycle of dictionary handling for a column chunk | ||
| type DictionaryState int | ||
|
|
||
| const ( | ||
| // DictNotRead: Dictionary page has not been read yet | ||
| DictNotRead DictionaryState = iota | ||
| // DictReadNotInserted: Dictionary page has been read and decoder configured, | ||
| // but not yet inserted into Arrow builder (for Arrow Dictionary types only) | ||
| DictReadNotInserted | ||
| // DictFullyProcessed: Dictionary has been read, configured, and inserted into builder | ||
| DictFullyProcessed | ||
| ) |
Member
There was a problem hiding this comment.
my only critique is that we shouldn't export these.
zeroshade
approved these changes
Oct 28, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix spurious
parquet: column chunk cannot have more than one dictionary.with specific parquet fileResolve #546
Parquet with
Bug
When maybeWriteNewDictionary() resets
newDictionary = falseat line 965, it causes the next call to readDictionary() to try to read the dictionary page again from the pager, which then calls configureDict() again, which throws the "cannot have more than one dictionary" error!The sequence is:
Fix
Added DictionaryState enum (column_reader.go):