Skip to content

[C++][Gandiva] ExprValidator does not validate the input expression of IN #55615

Done

Description

@dmitry-chirkov-dremio

Describe the bug, including details regarding any error messages, version, and platform.

To reproduce:

  1. Create an int32 field x.
  2. Build an IF with x as the condition and x as both results. The condition is not boolean.
  3. Build a projector with it. Make returns ExpressionValidationError: condition must be of boolean type, found type int32.
  4. Wrap the same IF in an IN expression (MakeInExpressionInt32(if_node, {1})) and build a projector.

Make returns OK and Evaluate returns a value.

ExprValidator checks the value list of IN but never visits eval_expr. An invalid input expression is accepted.

Also, InExpressionNode<int32_t>(nullptr, {1}) crashes Projector::Make with SIGSEGV (exit code 139). It should return a validation error.

The crash is in InExpressionNode<int>::ToString() (node.h:254). The cache key calls it before the validator runs.

Seen on macOS ARM64, main at ab5b42237d. The crash reproduces in CI on Linux ARM64, Linux ASAN and macOS Intel.

AI tools paired with common sense helped with the investigation, fix, and tests.

Component(s)

C++, Gandiva

Activity

  1. changed the title [-]ExprValidator does not validate the input expression of IN[/-] [+][C++][Gandiva] ExprValidator does not validate the input expression of IN[/+] on Nov 14, 2026
  2. added a commit that references this issue on Nov 27, 2026
  3. added this to the 27.0.0 milestone on Nov 27, 2026
  4. kou commented on Nov 27, 2026

    @kou
    Member

    Issue resolved by pull request 55609
    #55609

  5. added 2 commits that reference this issue on Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions