Skip to content

Commit

Permalink
Remove the Literal pattern matching for NullPropagation
Browse files Browse the repository at this point in the history
  • Loading branch information
chenghao-intel committed May 5, 2014
1 parent 29c8166 commit 68b9fad
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ object ColumnPruning extends Rule[LogicalPlan] {
object NullPropagation extends Rule[LogicalPlan] {
def apply(plan: LogicalPlan): LogicalPlan = plan transform {
case q: LogicalPlan => q transformExpressionsUp {
// Skip redundant folding of literals.
case l: Literal => l
case e @ Count(Literal(null, _)) => Literal(0, e.dataType)
case e @ Sum(Literal(c, _)) if(c == 0) => Literal(0, e.dataType)
case e @ Average(Literal(c, _)) if(c == 0) => Literal(0.0, e.dataType)
Expand Down

0 comments on commit 68b9fad

Please sign in to comment.