Github user kumarvishal09 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2147#discussion_r181698087
--- Diff:
integration/spark2/src/main/scala/org/apache/spark/sql/hive/CarbonPreAggregateRules.scala
---
@@ -753,10 +753,7 @@ case class CarbonPreAggregateQueryRules(sparkSession:
SparkSession) extends Rule
updatedAggExp.head,
name)(alias.exprId, alias.qualifier, Option(alias.metadata),
alias.isGenerated)
case alias@Alias(expression, name) =>
- AttributeReference(
- name,
- alias.dataType,
- alias.nullable) (alias.exprId, alias.qualifier,
alias.isGenerated)
+ alias
--- End diff --
In case of streaming top level aggregate node , it will always return
attribute reference, only in case of aggregate function it will return alias
with aggregate expression
---