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

refactor: switch BooleanBufferBuilder to NullBufferBuilder in binary_map #14341

Merged

Conversation

Chen-Yuan-Lai
Copy link
Contributor

Which issue does this PR close?

Closes #14115 .

Rationale for this change

As mentioned in #14115 , several examples in DataFusion codebase still using BooleanBufferBuilder rather than NullBufferBuilder, they should be replaced with NullBufferBuilder for optimization.

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added the physical-expr Physical Expressions label Jan 28, 2025
null_builder.append_n_non_nulls(null_index);
null_builder.append_null();
null_builder.append_n_non_nulls(num_values - null_index - 1);
null_builder.finish().unwrap()
Copy link
Member

Choose a reason for hiding this comment

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

it seems the unwrap is safe because upstream returns Some(xxx).

Copy link
Contributor

Choose a reason for hiding this comment

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

if it is @Chen-Yuan-Lai please add the comment that we know .unwrap is safe here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @xudong963 and @comphead , I have added the comment

@comphead comphead merged commit d18a1d3 into apache:main Jan 29, 2025
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
physical-expr Physical Expressions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use NullBufferBuilder instead of BooleanBufferBuilder for creating Null masks
4 participants