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-9499: [C++] AdaptiveIntBuilder::AppendNull does not increment the null count #7780

Closed
wants to merge 1 commit into from

Conversation

mrkn
Copy link
Member

@mrkn mrkn commented Jul 16, 2020

I found that both AdaptiveIntBuilder::AppendNull and AdaptiveUIntBuilder::AppendNull did not increment its null_count_.

By the way, I inserted additional assertions to check builder's null_count some appropriate places.

@mrkn mrkn requested review from wesm, pitrou and bkietz July 16, 2020 01:56
@mrkn mrkn changed the title ARROW-9499: [C++] AdaptiveIntBuilder::null_count does not return the null count ARROW-9499: [C++] AdaptiveIntBuilder::AppendNull does not increment the null count Jul 16, 2020
@github-actions
Copy link

Copy link
Member

@wesm wesm left a comment

Choose a reason for hiding this comment

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

+1

@wesm wesm closed this in 954547a Jul 16, 2020
@mrkn mrkn deleted the ARROW-9499 branch July 16, 2020 03:11
@pitrou
Copy link
Member

pitrou commented Jul 16, 2020

I think this PR is wrong. The null count is incremented when the pending data is committed to the builder.

@pitrou
Copy link
Member

pitrou commented Jul 16, 2020

Actually, we're lucky: the null count is overwritten by UnsafeAppendToBitmap(const uint8_t* valid_bytes, int64_t length). Still, I think it was hasty to merge this PR during the 1.0 release window.

@wesm
Copy link
Member

wesm commented Jul 16, 2020

Apologies. Perhaps we can open a JIRA to enhance test coverage around this issue

@mrkn
Copy link
Member Author

mrkn commented Jul 16, 2020

Committing the pending data does not occur every time after calling AppendNull so null_count couldn't reflect the number of nulls in realtime without incrementing in AppendNull?

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

Successfully merging this pull request may close these issues.

None yet

3 participants