diff --git a/cpp/velox/utils/VeloxBatchAppender.cc b/cpp/velox/utils/VeloxBatchAppender.cc index 719a9400529a7..8fa1ade217e02 100644 --- a/cpp/velox/utils/VeloxBatchAppender.cc +++ b/cpp/velox/utils/VeloxBatchAppender.cc @@ -42,7 +42,7 @@ std::shared_ptr VeloxBatchAppender::next() { buffer->append(rv.get()); for (auto nextCb = in_->next(); nextCb != nullptr; nextCb = in_->next()) { - auto nextVb = VeloxColumnarBatch::from(pool_, cb); + auto nextVb = VeloxColumnarBatch::from(pool_, nextCb); auto nextRv = nextVb->getRowVector(); buffer->append(nextRv.get()); if (buffer->size() >= minOutputBatchSize_) {