Skip to content
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

Closed

Conversation

nealrichardson
Copy link
Contributor

In C++, RecordBatch had AddColumn and RemoveColumn but no SetColumn; Table had all three. This adds the missing RecordBatch method and adds R bindings.

@github-actions
Copy link

Copy link
Member

@pitrou pitrou left a 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

ARROW_CHECK(column != nullptr);

if (!field->type()->Equals(column->type())) {
return Status::Invalid("Column data type ", field->type()->name(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Return TypeError?

Copy link
Contributor Author

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?

Copy link
Member

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 :-)

Copy link
Contributor Author

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

Copy link
Member

@pitrou pitrou left a 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.

@nealrichardson nealrichardson deleted the record-batch-add-column branch February 1, 2021 20:00
GeorgeAp pushed a commit to sirensolutions/arrow that referenced this pull request Jun 7, 2021
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>
michalursa pushed a commit to michalursa/arrow that referenced this pull request Jun 13, 2021
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants