From ab37791134b7317c99679ef5e4cb738c2ff9d9a4 Mon Sep 17 00:00:00 2001 From: hcz Date: Thu, 21 May 2020 15:28:10 +0800 Subject: [PATCH] Fix arrow stream termination --- src/Processors/Formats/Impl/ArrowBlockInputFormat.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Processors/Formats/Impl/ArrowBlockInputFormat.cpp b/src/Processors/Formats/Impl/ArrowBlockInputFormat.cpp index c8a098418b7..5468fbcac16 100644 --- a/src/Processors/Formats/Impl/ArrowBlockInputFormat.cpp +++ b/src/Processors/Formats/Impl/ArrowBlockInputFormat.cpp @@ -39,12 +39,12 @@ Chunk ArrowBlockInputFormat::generate() if (stream) { read_status = stream_reader->ReadNext(&single_batch[0]); + if (!single_batch[0]) + return res; } else { read_status = file_reader->ReadRecordBatch(record_batch_current, &single_batch[0]); - if (!single_batch[0]) - return res; } if (!read_status.ok()) throw Exception{"Error while reading batch of Arrow data: " + read_status.ToString(),