pitrou commented on a change in pull request #9365:
URL: https://github.com/apache/arrow/pull/9365#discussion_r567981613
##########
File path: cpp/src/arrow/record_batch.cc
##########
@@ -104,6 +104,27 @@ class SimpleRecordBatch : public RecordBatch {
internal::AddVectorElement(columns_, i,
column->data()));
}
+ Result<std::shared_ptr<RecordBatch>> SetColumn(
+ int i, const std::shared_ptr<Field>& field,
+ const std::shared_ptr<Array>& column) const override {
+ ARROW_CHECK(field != nullptr);
+ ARROW_CHECK(column != nullptr);
+
+ if (!field->type()->Equals(column->type())) {
+ return Status::Invalid("Column data type ", field->type()->name(),
Review comment:
Ah, that would be good. You may need to fix some tests too :-)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]