carbondata-issues mailing list archives

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

    https://github.com/apache/carbondata/pull/1724#discussion_r158765059
  
    --- 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 --
    
    This change is required for adding grouping expressions in logical plan for data loading
in pre aggregate table as now expressions in group clause will also be treated as columns
of pre aggregate table


---

Mime
View raw message