Fix arrow stream termination

This commit is contained in:
hcz 2020-05-21 15:28:10 +08:00
parent 4effdeaa0e
commit ab37791134

View File

@ -39,12 +39,12 @@ Chunk ArrowBlockInputFormat::generate()
if (stream) if (stream)
{ {
read_status = stream_reader->ReadNext(&single_batch[0]); read_status = stream_reader->ReadNext(&single_batch[0]);
if (!single_batch[0])
return res;
} }
else else
{ {
read_status = file_reader->ReadRecordBatch(record_batch_current, &single_batch[0]); read_status = file_reader->ReadRecordBatch(record_batch_current, &single_batch[0]);
if (!single_batch[0])
return res;
} }
if (!read_status.ok()) if (!read_status.ok())
throw Exception{"Error while reading batch of Arrow data: " + read_status.ToString(), throw Exception{"Error while reading batch of Arrow data: " + read_status.ToString(),