Skip to content

Commit

Permalink
Add DCHECK to catch unequal schemas
Browse files Browse the repository at this point in the history
Change-Id: If097de5f2823a81b7d0f04dfe3712d2b9686c795
  • Loading branch information
wesm committed Aug 22, 2017
1 parent 2952cfb commit a3996fe
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cpp/src/arrow/ipc/writer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,7 @@ Status WriteRecordBatchStream(const std::vector<std::shared_ptr<RecordBatch>>& b
RETURN_NOT_OK(RecordBatchStreamWriter::Open(dst, batches[0]->schema(), &writer));
for (const auto& batch : batches) {
// allow sizes > INT32_MAX
DCHECK(batch->schema()->Equals(*batches[0]->schema())) << "Schemas unequal";
RETURN_NOT_OK(writer->WriteRecordBatch(*batch, true));
}
RETURN_NOT_OK(writer->Close());
Expand Down

0 comments on commit a3996fe

Please sign in to comment.