Skip to content

Boolean expression evaluators don't short-circuit AND/OR #1118

Done

Description

@dino-saurabh

The generic Visit evaluates both children of And/Or before combining them (expression_visitor.h#L313-L325).
Java's boolean evaluators use ExpressionVisitors.visitEvaluator, which skips the right side when the left side already decides the result.

Affected: Evaluator (per row, via the residual filter in FileScanTaskReader), InclusiveMetricsEvaluator and StrictMetricsEvaluator (per data file), ManifestEvaluator (per manifest), and ParquetMetricsRowGroupFilter (per row group).

Proposal: add a VisitEvaluator that mirrors Java's and use it in these evaluators. Generic Visit stays as is for visitors that must see every node. One behavior change to note: an error on the right side is no longer reported when the left side decides the result, as in Java.

Activity

  1. added a commit that references this issue on Nov 26, 2026
    eae7520
  2. dino-saurabh commented on Nov 26, 2026

    @dino-saurabh
    ContributorAuthor

    @manuzhang would appreciate a review for #1181 thanks thanks : )

  3. added a commit that references this issue on Nov 27, 2026
    29d5716
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions