PredicateHelper Scala Trait

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

Table 1. PredicateHelper’s Methods
Method Description

splitConjunctivePredicates

splitDisjunctivePredicates

replaceAlias

canEvaluate

canEvaluateWithinJoin

Splitting Conjunctive Predicates — splitConjunctivePredicates Method

splitConjunctivePredicates(condition: Expression): Seq[Expression]

splitConjunctivePredicates takes the input condition 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 Method

splitDisjunctivePredicates(condition: Expression): Seq[Expression]

splitDisjunctivePredicates…​FIXME

Note
splitDisjunctivePredicates is used when…​FIXME

replaceAlias Method

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

replaceAlias…​FIXME

Note
replaceAlias is used when…​FIXME

canEvaluate Method

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

canEvaluate…​FIXME

Note
canEvaluate is used when…​FIXME

canEvaluateWithinJoin Method

canEvaluateWithinJoin(expr: Expression): Boolean

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

  • Expression is 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

Note

canEvaluateWithinJoin is used when:

  • PushPredicateThroughJoin logical optimization rule is executed

  • ReorderJoin logical optimization rule does createOrderedJoin

results matching ""

    No results matching ""