Skip to content

[GLUTEN-13681][VL] Check the first batch for row nulls in VeloxColumnarBatch::compose - #13682

Open
pratham76 wants to merge 1 commit into
apache:mainfrom
pratham76:fix-compose-first-batch-nulls
Open

pratham76 wants to merge 1 commit into
apache:mainfrom
pratham76:fix-compose-first-batch-nulls

Conversation

@pratham76

Copy link
Copy Markdown
Contributor

What changes are proposed in this pull request?

Fixes #13681.

VeloxColumnarBatch::compose builds the composed RowVector with no row nulls, so it checks each input for row nulls. For the first batch, an early continue skipped that check, so row nulls in the first batch were silently dropped instead of raising "Vectors to compose contain null bits". This PR runs the check for every batch.

Callers are not affected: the JNI repeatedThenCompose path builds its first batch without row nulls, and the JVM callers pass regular operator output. Only an input that already has row nulls in its first batch now gets the error instead of losing them.

How was this patch tested?

Added two tests to VeloxColumnarBatchTest; compose had no tests before:

  • compose: composes a 1-column and a 2-column batch and checks the column count, row count and values; checks that mismatched row counts are rejected.
  • composeRejectsRowNullsInAnyBatch: checks that a batch with row nulls is rejected in either position. The first-position case fails without this fix.

Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude claude-opus-5-5

@github-actions github-actions Bot added the VELOX label Nov 19, 2026
@pratham76

Copy link
Copy Markdown
Contributor Author

@zhouyuan PTAL - The CI failure seems to be due to maven pull errors

@pratham76
pratham76 force-pushed the fix-compose-first-batch-nulls branch from 263b053 to 07955bc Compare November 24, 2026 10:03
@zhouyuan
zhouyuan requested a balanced review from Copilot November 24, 2026 10:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues remain, and the change includes coverage for composition behavior, row-count mismatches, and row-null rejection in both batch positions.

No open issues 🎉

Review effort: Lite

@pratham76

Copy link
Copy Markdown
Contributor Author

@zhouyuan could we check this PR in? Thanks!

@zhouyuan

Copy link
Copy Markdown
Member

@pratham76 could you please do a rebase?

…arBatch::compose

compose() skipped the row-nulls check for the first batch because of an
early `continue`, so row nulls in that batch were silently dropped from
the composed batch, which is created without row nulls. Run the check for
every batch, and add unit tests for compose.
@pratham76
pratham76 force-pushed the fix-compose-first-batch-nulls branch from 07955bc to 072c4d7 Compare November 28, 2026 11:13
@pratham76

Copy link
Copy Markdown
Contributor Author

@pratham76 could you please do a rebase?

Hey @zhouyuan Have rebased, Thanks!

@pratham76

Copy link
Copy Markdown
Contributor Author

CI has passed as well, please do take a look when you get a chance. Thanks!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[VL] VeloxColumnarBatch::compose skips the row-nulls check for the first batch

3 participants