Skip to content

Commit

Permalink
improve the comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
gatorsmile committed Nov 29, 2016
1 parent 025632a commit 0722ae5
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,14 @@ abstract class QueryPlan[PlanType <: QueryPlan[PlanType]] extends TreeNode[PlanT
}

/**
* Generate IsNotNull constraints from the null intolerant child expressions of constraints.
* Generate Attribute-specific IsNotNull constraints from the null intolerant child expressions
* of constraints.
*/
private def generateIsNotNullConstraints(constraint: Expression): Seq[Expression] =
constraint match {
case IsNotNull(_: Attribute) => constraint :: Nil
// When the root is IsNotNull, we can push IsNotNull through the child null intolerant
// expressions.
// expressions
case IsNotNull(expr) => scanNullIntolerantExpr(expr).map(IsNotNull(_))
// Constraints always return true for all the inputs. That means, null will never be returned.
// Thus, we can infer `IsNotNull(constraint)`, and also push IsNotNull through the child
Expand Down

0 comments on commit 0722ae5

Please sign in to comment.