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

Add ability to reuse Rows in encoder #4533

Closed
wants to merge 1 commit into from
Closed

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Jul 16, 2023

Which issue does this PR close?

Closes #4479

Rationale for this change

When converting many (many!) record batches I would like to avoid the overhead of allocating / zeroing out temporary allocations. See #4479 for more details

What changes are included in this PR?

Add RowConverter::set_target API to reuse an existing Rows when calling RowConverter:: convert_columns

If this is an acceptable API I will write some tests

Are there any user-facing changes?

@github-actions github-actions bot added the arrow Changes to the arrow crate label Jul 16, 2023
@tustvold
Copy link
Contributor

tustvold commented Jul 16, 2023

Do you have any benchmarks for this

Edit: I also wonder if being able to append to an existing rows might be a more flexible API (I will have a play tomorrow)

@alamb
Copy link
Contributor Author

alamb commented Jul 16, 2023

Do you have any benchmarks for this

I do not, but I will create some

@alamb
Copy link
Contributor Author

alamb commented Jul 16, 2023

Edit: I also wonder if being able to append to an existing rows might be a more flexible API (I will have a play tomorrow)

For DataFusion we would also need a way to 'clear' an existing Rows

@alamb alamb marked this pull request as draft July 18, 2023 11:47
@alamb
Copy link
Contributor Author

alamb commented Jul 18, 2023

Will return to this after some profiling results

@tustvold
Copy link
Contributor

#4541 contains a proposal for a slightly more flexible API, that should have similar performance characteristics

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RowCoverter::convert that targets an existing Rows
2 participants