Commits


Sutou Kouhei authored and GitHub committed 6ab7a18fdc4
GH-39163: [C++] Add missing data copy in StreamDecoder::Consume(data) (#39164) ### Rationale for this change We need to copy data for metadata message. Because it may be used in subsequent `Consume(data)` calls. We can't assume that the given `data` is still valid in subsequent `Consume(data)`. We also need to copy buffered `data` because it's used in subsequent `Consume(data)` calls. ### What changes are included in this PR? * Add missing copies. * Clean up existing buffer copy codes. * Change tests to use ephemeral `data` to detect this case. * Add `copy_record_batch` option to `CollectListener` to copy decoded record batches. ### Are these changes tested? Yes. ### Are there any user-facing changes? Yes. * Closes #39163 * Closes: #39163 Authored-by: Sutou Kouhei <kou@clear-code.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>