feat: support reading dictionary-encoded columns over Arrow Flight - #433
Open
owencorrigan wants to merge 2 commits into
Open
feat: support reading dictionary-encoded columns over Arrow Flight#433owencorrigan wants to merge 2 commits into
owencorrigan wants to merge 2 commits into
Conversation
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.
What's Changed
The C# Arrow Flight reader (
RecordBatchReaderImplementation) threwNotImplementedExceptionon any dictionary batch, so a Flight stream containing adictionary-encoded column could not be read.
ReadNextRecordBatchAsyncnow loops over the incoming Flight messages, feedingeach through the base
CreateArrowObjectFromMessage(which reads dictionarybatches into the
DictionaryMemoand returns null for them) until it yields arecord batch, instead of throwing on any non-record-batch message. Handles both
single and replacement dictionaries.
DictionaryMemovia a new base helperReadSchemaFromMessage, so dictionary-encoded fields are registered(
FlightMessageSerializerpreviously discarded them).The change routes dictionary batches to the existing
ArrowReaderImplementationdecoder, so it is not specific to any particular index or value type. Validated
against a pyarrow
RecordBatchStreamserving adictionary<int16, string>column(single + replacement dictionaries); the current reader throws on the same stream.
Refs #180 (receive side).
Generated-By: Claude Opus 4.8