Z1Wu commented on code in PR #9280:
URL: https://github.com/apache/incubator-gluten/pull/9280#discussion_r2039714220
##########
gluten-ut/test/src/test/scala/org/apache/gluten/extension/GlutenExtensionRewriteRuleSuite.scala:
##########
@@ -62,4 +62,15 @@ 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')")
+ val df = sql("""
+ |SELECT SUM(f1) / COUNT(DISTINCT f2, f3) FROM t GROUP BY
f4;
+ |""".stripMargin)
+ assert(df.collect()(0).getDouble(0) == 6)
Review Comment:
fixed
--
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]