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

hongze 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 a415897d1 [VL] Add a new test case for FlushableHashAggregateRule's 
coverage (#6757)
a415897d1 is described below

commit a415897d1f8f94cfed407a93eb6bf39d748e8a87
Author: Hongze Zhang <[email protected]>
AuthorDate: Fri Aug 9 08:34:14 2024 +0800

    [VL] Add a new test case for FlushableHashAggregateRule's coverage (#6757)
---
 .../execution/VeloxAggregateFunctionsSuite.scala     | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git 
a/backends-velox/src/test/scala/org/apache/gluten/execution/VeloxAggregateFunctionsSuite.scala
 
b/backends-velox/src/test/scala/org/apache/gluten/execution/VeloxAggregateFunctionsSuite.scala
index fb1f05426..dc488d446 100644
--- 
a/backends-velox/src/test/scala/org/apache/gluten/execution/VeloxAggregateFunctionsSuite.scala
+++ 
b/backends-velox/src/test/scala/org/apache/gluten/execution/VeloxAggregateFunctionsSuite.scala
@@ -1180,7 +1180,7 @@ class VeloxAggregateFunctionsDefaultSuite extends 
VeloxAggregateFunctionsSuite {
       .set(GlutenConfig.VELOX_FLUSHABLE_PARTIAL_AGGREGATION_ENABLED.key, 
"false")
   }
 
-  test("group sets with keys") {
+  test("flushable aggregate rule") {
     withSQLConf(SQLConf.ADAPTIVE_EXECUTION_ENABLED.key -> "false") {
       runQueryAndCompare(VeloxAggregateFunctionsSuite.GROUP_SETS_TEST_SQL) {
         df =>
@@ -1218,6 +1218,24 @@ class VeloxAggregateFunctionsFlushSuite extends 
VeloxAggregateFunctionsSuite {
     }
   }
 
+  test("flushable aggregate rule - agg input already distributed by keys") {
+    withSQLConf(
+      SQLConf.ADAPTIVE_EXECUTION_ENABLED.key -> "false",
+      SQLConf.FILES_MAX_PARTITION_BYTES.key -> "1k") {
+      runQueryAndCompare(
+        "select * from (select distinct l_orderkey,l_partkey from lineitem) a" 
+
+          " inner join (select l_orderkey from lineitem limit 10) b" +
+          " on a.l_orderkey = b.l_orderkey limit 10") {
+        df =>
+          val executedPlan = getExecutedPlan(df)
+          assert(
+            executedPlan.exists(plan => 
plan.isInstanceOf[RegularHashAggregateExecTransformer]))
+          assert(
+            executedPlan.exists(plan => 
plan.isInstanceOf[FlushableHashAggregateExecTransformer]))
+      }
+    }
+  }
+
   test("flushable aggregate decimal sum") {
     withSQLConf(
       SQLConf.ADAPTIVE_EXECUTION_ENABLED.key -> "false",


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

Reply via email to