diff --git a/cpp/src/arrow/record_batch.cc b/cpp/src/arrow/record_batch.cc index 5f1f192133beb..5e749f661f561 100644 --- a/cpp/src/arrow/record_batch.cc +++ b/cpp/src/arrow/record_batch.cc @@ -466,7 +466,7 @@ Result> ConcatenateRecordBatches( length = array->length(); } else if (length != array->length()) { return Status::Invalid( - "column index ", i, " length is ", array->length(), + "column index ", col, " length is ", array->length(), ", does not match the length of previous columns: ", length); } columns.push_back(array);