-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GH-38168: [Java] Fix multi-batch Dictionary in Arrow{Reader|Writer}
When manually writing dictionary vectors and writing multiple batches in a single `ArrowFileWriter`, only the first dictionary batch was written and subsequent batches were ignored. On reading, the `ArrowFileReader` would load only the first batch and use that batch for decoding subsequent batches, resulting in errors or incorrect decodings. This patch will now flush the dictionaries on each batch write and load the batches for the dictionaries on read. Following the docs at https://arrow.apache.org/docs/format/Columnar.html#dictionary-messages. Note that this does not address the delta dictionary encoding issue as the writer does not currently havea means of setting the delta flag. Neither does it allow for streaming writes of dictionaries (though the unit tests show a work-around). Fix for #38168
- Loading branch information
Showing
3 changed files
with
375 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.