Skip to content

Conversation

@Lancern
Copy link

@Lancern Lancern commented Nov 5, 2025

Rationale for this change

The arrow::compute::MakeExecBatch function calls DataType::id() on partial.type() which could be a null pointer when partial is a datum representing a table. MakeExecBatch fails to check for this and thus null pointer dereference indeed happen.

What changes are included in this PR?

This patch adds a simple check in MakeExecBatch before calling DataType::id() to make sure it won't gets called on a null pointer.

Are these changes tested?

Yes. This patch updates the unit test ExpressionUtils.MakeExecBatch and includes a case that calls MakeExecBatch with a table.

Are there any user-facing changes?

No.

This PR indeed resolve a crash problem, but I'm not quite sure whether this should be classified as a "critical fix".

Resolve #48062 .

@github-actions
Copy link

github-actions bot commented Nov 5, 2025

⚠️ GitHub issue #48062 has been automatically assigned in GitHub to PR creator.

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.

[C++] MakeExecBatch would dereference null pointer when the input Datum is constructed from a Table

1 participant