You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GH-48076: [C++][Flight] fix GeneratorStream for Tables (#48082)
### Rationale for this change
After the changes in #47115, GeneratorStreams backed by anything else than RecordBatches failed. This includes Tables and RecordBatchReaders.
This was caused by a too strict assumption that the RecordBatchStream#GetSchemaPayload would always get called, which is not the case when the GeneratorStream is backed by a Table or a RecordBatchReader.
### What changes are included in this PR?
Removal of the problematic assertion and initialization of the writer object when it is needed first.
Also, to accommodate for this case, drop the incoming message when initializing the writer in Next, as the message there
is of the SCHEMA type and we want RECORD_BATCH or DICTIONARY_BATCH one.
### Are these changes tested?
Yes, via CI. Tests for the GeneratorStreams were extended so that they test GeneratorStreams backed by Tables and RecordBatchReaders, not just RecordBatches.
### Are there any user-facing changes?
No, just a fix for a regression restoring the functionality from version 21.0.0 and earlier.
* GitHub Issue: #48076
Authored-by: Dan Homola <[email protected]>
Signed-off-by: David Li <[email protected]>
0 commit comments