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

fix: optimize isNullAt #732

Merged
merged 1 commit into from
Jul 30, 2024
Merged

Conversation

kazuyukitanimura
Copy link
Contributor

Which issue does this PR close?

Part of #679 and #670

Rationale for this change

This PR improves the isNullAt performance

What changes are included in this PR?

The new isNullAt method uses the OR operator instead of the if clause

How are these changes tested?

Existing tests

@kazuyukitanimura
Copy link
Contributor Author

SF=100

Before

Screenshot 2024-07-26 at 4 45 07 PM

After

Screenshot 2024-07-26 at 4 45 28 PM

@kazuyukitanimura kazuyukitanimura marked this pull request as ready for review July 26, 2024 23:46
@kazuyukitanimura
Copy link
Contributor Author

@@ -153,11 +153,7 @@ public CDataDictionaryProvider getDictionaryProvider() {

@Override
public boolean isNullAt(int rowId) {
if (this.valueBufferAddress == -1) {
Copy link
Member

Choose a reason for hiding this comment

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

I'm surprised that Java compiler cannot optimize this.

@andygrove andygrove merged commit c4a06f0 into apache:main Jul 30, 2024
75 checks passed
@kazuyukitanimura
Copy link
Contributor Author

Thanks

himadripal pushed a commit to himadripal/datafusion-comet that referenced this pull request Sep 7, 2024
(cherry picked from commit c4a06f0)
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