This is an automated email from the ASF dual-hosted git repository.

lgbo 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 aac1b87cde fix pre-projection not take effect (#7863)
aac1b87cde is described below

commit aac1b87cde55163c8c54c725bee1e112d2b25444
Author: kevinyhzou <[email protected]>
AuthorDate: Fri Nov 8 14:09:18 2024 +0800

    fix pre-projection not take effect (#7863)
---
 .../gluten/extension/PushdownAggregatePreProjectionAheadExpand.scala    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/backends-clickhouse/src/main/scala/org/apache/gluten/extension/PushdownAggregatePreProjectionAheadExpand.scala
 
b/backends-clickhouse/src/main/scala/org/apache/gluten/extension/PushdownAggregatePreProjectionAheadExpand.scala
index 21f1be2f2f..9335fd8829 100644
--- 
a/backends-clickhouse/src/main/scala/org/apache/gluten/extension/PushdownAggregatePreProjectionAheadExpand.scala
+++ 
b/backends-clickhouse/src/main/scala/org/apache/gluten/extension/PushdownAggregatePreProjectionAheadExpand.scala
@@ -96,7 +96,7 @@ case class PushdownAggregatePreProjectionAheadExpand(session: 
SparkSession)
         def projectInputExists(expr: Expression, inputs: Seq[Attribute]): 
Boolean = {
           expr.children.foreach {
             case a: Attribute =>
-              return inputs.indexOf(a) != -1
+              return inputs.exists(i => i.name.equals(a.name) && 
i.exprId.equals(a.exprId))
             case p: Expression =>
               return projectInputExists(p, inputs)
             case _ =>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to