liujiayi771 commented on code in PR #9280:
URL: https://github.com/apache/incubator-gluten/pull/9280#discussion_r2039825342


##########
gluten-ut/test/src/test/scala/org/apache/gluten/extension/GlutenExtensionRewriteRuleSuite.scala:
##########
@@ -62,4 +62,21 @@ class GlutenExtensionRewriteRuleSuite extends 
WholeStageTransformerSuite {
       }
     )
   }
+
+  test("GLUTEN-9279 - Not Pull out expression to avoid invalid reference 
binding") {
+    withTable("t") {
+      sql("CREATE TABLE t(f1 String, f2 String, f3 String, f4 String) USING 
CSV")
+      sql("INSERT INTO t values ('1', '2', '3', '4'), ('11' ,'22', '33', '4')")
+      runQueryAndCompare(
+        """
+          |SELECT SUM(f1) / COUNT(DISTINCT f2, f3) FROM t GROUP BY f4;
+          |""".stripMargin,
+        noFallBack = false
+      )(
+        df => {
+          checkGlutenOperatorMatch[ProjectExecTransformer](df)

Review Comment:
   Also check the number of ProjectExecTransformer and 
HashAggregateExecBaseTransformer.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to