Skip to content

PredicateHelper Scala Trait

PredicateHelper defines the <> that are used to work with predicates (mainly).

[[methods]] .PredicateHelper's Methods [cols="1,2",options="header",width="100%"] |=== | Method | Description


=== [[splitConjunctivePredicates]] Splitting Conjunctive Predicates -- splitConjunctivePredicates Method

[source, scala]

splitConjunctivePredicates(condition: Expression): Seq[Expression]

splitConjunctivePredicates takes the input condition expressions/[expression] and splits it to two expressions if they are children of a And binary expression.

splitConjunctivePredicates splits the child expressions recursively down the child expressions until no conjunctive And binary expressions exist.

=== [[splitDisjunctivePredicates]] splitDisjunctivePredicates Method

[source, scala]

splitDisjunctivePredicates(condition: Expression): Seq[Expression]


NOTE: splitDisjunctivePredicates is used when...FIXME

=== [[replaceAlias]] replaceAlias Method

[source, scala]

replaceAlias( condition: Expression, aliases: AttributeMap[Expression]): Expression


NOTE: replaceAlias is used when...FIXME

=== [[canEvaluate]] canEvaluate Method

[source, scala]

canEvaluate(expr: Expression, plan: LogicalPlan): Boolean


NOTE: canEvaluate is used when...FIXME

=== [[canEvaluateWithinJoin]] canEvaluateWithinJoin Method

[source, scala]

canEvaluateWithinJoin(expr: Expression): Boolean

canEvaluateWithinJoin indicates whether a expressions/[Catalyst expression] can be evaluated within a join, i.e. when one of the following conditions holds:

  • Expression is expressions/[deterministic]

  • Expression is not Unevaluable, ListQuery or Exists

  • Expression is a SubqueryExpression with no child expressions

  • Expression is a AttributeReference

  • Any expression with child expressions that meet one of the above conditions


canEvaluateWithinJoin is used when:

  • PushPredicateThroughJoin logical optimization rule is[executed]

* ReorderJoin logical optimization rule does[createOrderedJoin]