carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kumarvishal09 <...@git.apache.org>
Subject [GitHub] carbondata pull request #1724: [CARBONDATA-1940][PreAgg] Fixed bug for creat...
Date Wed, 27 Dec 2017 11:54:59 GMT
Github user kumarvishal09 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1724#discussion_r158803200
  
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/hive/CarbonPreAggregateRules.scala
---
    @@ -1264,13 +1264,16 @@ object CarbonPreAggregateDataLoadingRules extends Rule[LogicalPlan]
{
       override def apply(plan: LogicalPlan): LogicalPlan = {
         val validExpressionsMap = scala.collection.mutable.LinkedHashMap.empty[String, NamedExpression]
         plan transform {
    -      case aggregate@Aggregate(_, aExp, _) if validateAggregateExpressions(aExp) =>
    +      case aggregate@Aggregate(groupingExpressions, aExp, _) if validateAggregateExpressions(aExp)
=>
             aExp.foreach {
               case alias: Alias =>
                 validExpressionsMap ++= validateAggregateFunctionAndGetAlias(alias)
               case _: UnresolvedAlias =>
               case namedExpr: NamedExpression => validExpressionsMap.put(namedExpr.name,
namedExpr)
             }
    +        groupingExpressions foreach {
    --- End diff --
    
    Ok, This is to handle when column is on grouping expression but not on projection, as
we are adding column in data map user can create aggregation data map by adding that column
in projection list.  But it is OK to support this type of expression in pre aggregate .


---

Mime
View raw message