Github user gvramana commented on a diff in the pull request: https://github.com/apache/carbondata/pull/2366#discussion_r195972758 --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/hive/CarbonPreAggregateRules.scala --- @@ -1787,20 +1839,23 @@ case class CarbonPreAggregateDataLoadingRules(sparkSession: SparkSession) // named expression list otherwise update the list and add it to set if (!validExpressionsMap.contains(AggExpToColumnMappingModel(sumExp))) { namedExpressionList += - Alias(expressions.head, name + "_ sum")(NamedExpression.newExprId, + CarbonCompilerUtil.createAliasRef(expressions.head, + name + "_ sum", + NamedExpression.newExprId, alias.qualifier, Some(alias.metadata), - alias.isGenerated) + Some(alias)) validExpressionsMap += AggExpToColumnMappingModel(sumExp) } // check with same expression already count is present then do not add to // named expression list otherwise update the list and add it to set if (!validExpressionsMap.contains(AggExpToColumnMappingModel(countExp))) { namedExpressionList += - Alias(expressions.last, name + "_ count")(NamedExpression.newExprId, - alias.qualifier, - Some(alias.metadata), - alias.isGenerated) + CarbonCompilerUtil.createAliasRef(expressions.last, name + "_ count", --- End diff -- Change CarbonCompilerUtil name as it gives meaning of carbon compiler
---