This is an automated email from the ASF dual-hosted git repository.
ulyssesyou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git
The following commit(s) were added to refs/heads/main by this push:
new c0b9efc80 [CORE] Add Complete case match in PullOutPreProject (#4968)
c0b9efc80 is described below
commit c0b9efc803170e32ff7579596c0d2b0426a8c9cf
Author: Joey <[email protected]>
AuthorDate: Fri Mar 15 15:21:14 2024 +0800
[CORE] Add Complete case match in PullOutPreProject (#4968)
---
.../io/glutenproject/execution/GlutenFunctionValidateSuite.scala | 2 +-
.../scala/io/glutenproject/extension/columnar/PullOutPreProject.scala | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git
a/backends-clickhouse/src/test/scala/io/glutenproject/execution/GlutenFunctionValidateSuite.scala
b/backends-clickhouse/src/test/scala/io/glutenproject/execution/GlutenFunctionValidateSuite.scala
index 4f820343a..3a0d9f62c 100644
---
a/backends-clickhouse/src/test/scala/io/glutenproject/execution/GlutenFunctionValidateSuite.scala
+++
b/backends-clickhouse/src/test/scala/io/glutenproject/execution/GlutenFunctionValidateSuite.scala
@@ -607,7 +607,7 @@ class GlutenFunctionValidateSuite extends
GlutenClickHouseWholeStageTransformerS
runQueryAndCompare(
"select id, if(id % 2 = 0, sum(id), max(id)) as s1, " +
"if(id %2 = 0, sum(id+1), sum(id+2)) as s2 from range(10) group by
id") {
- df => checkOperatorCount[ProjectExecTransformer](1)(df)
+ df => checkOperatorCount[ProjectExecTransformer](2)(df)
}
// CSE in sort
diff --git
a/gluten-core/src/main/scala/io/glutenproject/extension/columnar/PullOutPreProject.scala
b/gluten-core/src/main/scala/io/glutenproject/extension/columnar/PullOutPreProject.scala
index 63c7aef78..5bf70597c 100644
---
a/gluten-core/src/main/scala/io/glutenproject/extension/columnar/PullOutPreProject.scala
+++
b/gluten-core/src/main/scala/io/glutenproject/extension/columnar/PullOutPreProject.scala
@@ -19,7 +19,7 @@ package io.glutenproject.extension.columnar
import io.glutenproject.utils.PullOutProjectHelper
import org.apache.spark.sql.catalyst.expressions._
-import
org.apache.spark.sql.catalyst.expressions.aggregate.{AggregateExpression,
Partial}
+import
org.apache.spark.sql.catalyst.expressions.aggregate.{AggregateExpression,
Complete, Partial}
import org.apache.spark.sql.catalyst.rules.Rule
import org.apache.spark.sql.execution.{ProjectExec, SortExec, SparkPlan,
TakeOrderedAndProjectExec}
import org.apache.spark.sql.execution.aggregate.{BaseAggregateExec,
TypedAggregateExpression}
@@ -53,7 +53,7 @@ object PullOutPreProject extends Rule[SparkPlan] with
PullOutProjectHelper {
} else {
expr.filter.exists(isNotAttribute) ||
(expr.mode match {
- case Partial =>
+ case Partial | Complete =>
expr.aggregateFunction.children.exists(isNotAttributeAndLiteral)
case _ => false
})
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]