Skip to content

Commit

Permalink
rename the func
Browse files Browse the repository at this point in the history
  • Loading branch information
gatorsmile committed Nov 29, 2016
1 parent 0722ae5 commit f693040
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ abstract class QueryPlan[PlanType <: QueryPlan[PlanType]] extends TreeNode[PlanT
*/
private def constructIsNotNullConstraints(constraints: Set[Expression]): Set[Expression] = {
// First, we propagate constraints from the null intolerant expressions.
var isNotNullConstraints: Set[Expression] = constraints.flatMap(generateIsNotNullConstraints)
var isNotNullConstraints: Set[Expression] = constraints.flatMap(inferIsNotNullConstraints)

// Second, we infer additional constraints from non-nullable attributes that are part of the
// operator's output
Expand All @@ -57,10 +57,10 @@ abstract class QueryPlan[PlanType <: QueryPlan[PlanType]] extends TreeNode[PlanT
}

/**
* Generate Attribute-specific IsNotNull constraints from the null intolerant child expressions
* Infer the Attribute-specific IsNotNull constraints from the null intolerant child expressions
* of constraints.
*/
private def generateIsNotNullConstraints(constraint: Expression): Seq[Expression] =
private def inferIsNotNullConstraints(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
Expand Down

0 comments on commit f693040

Please sign in to comment.