New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ARROW-10520: [C++][R] Implement add/remove/replace for RecordBatch #9365
ARROW-10520: [C++][R] Implement add/remove/replace for RecordBatch #9365
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just one nit
cpp/src/arrow/record_batch.cc
Outdated
ARROW_CHECK(column != nullptr); | ||
|
||
if (!field->type()->Equals(column->type())) { | ||
return Status::Invalid("Column data type ", field->type()->name(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Return TypeError
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. This is just copied from L92 above; should I change that one too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, that would be good. You may need to fix some tests too :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed 3 in this file, PTAL
e6e3509
to
a809ae3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, thank you. Let's just wait for CI before merging.
In C++, RecordBatch had AddColumn and RemoveColumn but no SetColumn; Table had all three. This adds the missing RecordBatch method and adds R bindings. Closes apache#9365 from nealrichardson/record-batch-add-column Authored-by: Neal Richardson <neal.p.richardson@gmail.com> Signed-off-by: Neal Richardson <neal.p.richardson@gmail.com>
In C++, RecordBatch had AddColumn and RemoveColumn but no SetColumn; Table had all three. This adds the missing RecordBatch method and adds R bindings. Closes apache#9365 from nealrichardson/record-batch-add-column Authored-by: Neal Richardson <neal.p.richardson@gmail.com> Signed-off-by: Neal Richardson <neal.p.richardson@gmail.com>
In C++, RecordBatch had AddColumn and RemoveColumn but no SetColumn; Table had all three. This adds the missing RecordBatch method and adds R bindings.