Github user jackylk commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2083#discussion_r177145511
--- Diff:
integration/spark2/src/main/scala/org/apache/spark/sql/hive/CarbonPreAggregateRules.scala
---
@@ -405,11 +517,30 @@ case class CarbonPreAggregateQueryRules(sparkSession:
SparkSession) extends Rule
carbonTable,
agg)
isPlanUpdated = true
- Aggregate(updatedGroupExp,
+ val updateAggPlan = Aggregate(updatedGroupExp,
updatedAggExp,
Filter(updatedFilterExpression.get,
CarbonReflectionUtils
.getSubqueryAlias(sparkSession, Some(alias), newChild,
None)))
+ if(carbonTable.isStreamingTable) {
--- End diff --
These code is duplicated 3 times
---