mustafasrepo commented on code in PR #7488:
URL: https://github.com/apache/arrow-datafusion/pull/7488#discussion_r1318303226


##########
datafusion/sqllogictest/test_files/tpch/q15.slt.part:
##########
@@ -95,20 +95,20 @@ SortPreservingMergeExec: [s_suppkey@0 ASC NULLS LAST]
 ----------------------------------FilterExec: l_shipdate@3 >= 9496 AND 
l_shipdate@3 < 9587
 ------------------------------------CsvExec: file_groups={4 groups: 
[[WORKSPACE_ROOT/datafusion/sqllogictest/test_files/tpch/data/lineitem.tbl:0..18561749],
 
[WORKSPACE_ROOT/datafusion/sqllogictest/test_files/tpch/data/lineitem.tbl:18561749..37123498],
 
[WORKSPACE_ROOT/datafusion/sqllogictest/test_files/tpch/data/lineitem.tbl:37123498..55685247],
 
[WORKSPACE_ROOT/datafusion/sqllogictest/test_files/tpch/data/lineitem.tbl:55685247..74246996]]},
 projection=[l_suppkey, l_extendedprice, l_discount, l_shipdate], 
has_header=false
 ----------CoalesceBatchesExec: target_batch_size=8192
-------------RepartitionExec: 
partitioning=Hash([MAX(revenue0.total_revenue)@0], 4), input_partitions=1
---------------AggregateExec: mode=Final, gby=[], 
aggr=[MAX(revenue0.total_revenue)]
-----------------CoalescePartitionsExec
-------------------AggregateExec: mode=Partial, gby=[], 
aggr=[MAX(revenue0.total_revenue)]
---------------------ProjectionExec: expr=[SUM(lineitem.l_extendedprice * 
Int64(1) - lineitem.l_discount)@1 as total_revenue]
-----------------------AggregateExec: mode=FinalPartitioned, gby=[l_suppkey@0 
as l_suppkey], aggr=[SUM(lineitem.l_extendedprice * Int64(1) - 
lineitem.l_discount)]
-------------------------CoalesceBatchesExec: target_batch_size=8192
---------------------------RepartitionExec: partitioning=Hash([l_suppkey@0], 
4), input_partitions=4
-----------------------------AggregateExec: mode=Partial, gby=[l_suppkey@0 as 
l_suppkey], aggr=[SUM(lineitem.l_extendedprice * Int64(1) - 
lineitem.l_discount)]
-------------------------------ProjectionExec: expr=[l_suppkey@0 as l_suppkey, 
l_extendedprice@1 as l_extendedprice, l_discount@2 as l_discount]
---------------------------------CoalesceBatchesExec: target_batch_size=8192
-----------------------------------FilterExec: l_shipdate@3 >= 9496 AND 
l_shipdate@3 < 9587
-------------------------------------CsvExec: file_groups={4 groups: 
[[WORKSPACE_ROOT/datafusion/sqllogictest/test_files/tpch/data/lineitem.tbl:0..18561749],
 
[WORKSPACE_ROOT/datafusion/sqllogictest/test_files/tpch/data/lineitem.tbl:18561749..37123498],
 
[WORKSPACE_ROOT/datafusion/sqllogictest/test_files/tpch/data/lineitem.tbl:37123498..55685247],
 
[WORKSPACE_ROOT/datafusion/sqllogictest/test_files/tpch/data/lineitem.tbl:55685247..74246996]]},
 projection=[l_suppkey, l_extendedprice, l_discount, l_shipdate], 
has_header=false
-
+------------RepartitionExec: 
partitioning=Hash([MAX(revenue0.total_revenue)@0], 4), input_partitions=4
+--------------RepartitionExec: partitioning=RoundRobinBatch(4), 
input_partitions=1

Review Comment:
   Also I did a benchmark for query 15. It seems that performance has no 
noticable change
   
   | Query    | main | branch|Change|
   |----|----|----|----|
   | Query 15     | 77.34ms | 78.60ms| no change |
   
   However, since `benefits from partitioning` flag is `true` for hash 
repartition, I think new plan is better, and is less surprising plan.



-- 
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]

Reply via email to