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

For the various Yielder objects, don't create new Yielders and instead mutate state. #12475

Merged
merged 1 commit into from
Apr 27, 2022

Conversation

gianm
Copy link
Contributor

@gianm gianm commented Apr 22, 2022

@cheddar wrote this patch, so I can't take credit for it. But I did test it, and it seems to work as advertised. It's part of a series of work we were doing to reduce allocations in the query path, which also includes #12468 and #12474.

return new Yielder<OutType>()
{
private Yielder<T> myYielder = yielder;
private CombiningYieldingAccumulator<OutType, T> accum = combiningAccumulator;
Copy link
Member

Choose a reason for hiding this comment

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

nit: this can be final

@gianm gianm merged commit e7e49ec into apache:master Apr 27, 2022
@gianm gianm deleted the allocations-yielder branch April 27, 2022 17:52
@abhishekagarwal87 abhishekagarwal87 added this to the 24.0.0 milestone Aug 26, 2022
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.

4 participants