Skip to content

Commit 6a0df9e

Browse files
committed
Fix RecordBatchCountRows to unwrap Result<FileBlock> from GetRecordBatchBlock
1 parent 7094cd6 commit 6a0df9e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cpp/src/arrow/ipc/reader.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1427,8 +1427,8 @@ class RecordBatchFileReaderImpl : public RecordBatchFileReader {
14271427
Result<int64_t> RecordBatchCountRows(int i) override {
14281428
DCHECK_GE(i, 0);
14291429
DCHECK_LT(i, num_record_batches());
1430-
ARROW_ASSIGN_OR_RAISE(auto outer_message,
1431-
ReadMessageFromBlock(GetRecordBatchBlock(i)));
1430+
ARROW_ASSIGN_OR_RAISE(auto block, GetRecordBatchBlock(i));
1431+
ARROW_ASSIGN_OR_RAISE(auto outer_message, ReadMessageFromBlock(block));
14321432
auto metadata = outer_message->metadata();
14331433
const flatbuf::Message* message = nullptr;
14341434
RETURN_NOT_OK(

0 commit comments

Comments
 (0)