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 Thu, 28 Dec 2017 04:44:18 GMT
Github user geetikagupta16 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1724#discussion_r158896776
  
    --- 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 --
    
    As per CARBONDATA-1940, it was throwing an exception when grouping columns were not added
in projection of preaggregate table


---

Mime
View raw message