korowa commented on code in PR #9676:
URL: https://github.com/apache/arrow-datafusion/pull/9676#discussion_r1530969231


##########
datafusion/sqllogictest/test_files/tpch/q11.slt.part:
##########
@@ -75,10 +75,10 @@ Limit: skip=0, fetch=10
 ----------------------TableScan: nation projection=[n_nationkey, n_name], 
partial_filters=[nation.n_name = Utf8("GERMANY")]
 physical_plan
 GlobalLimitExec: skip=0, fetch=10
---SortPreservingMergeExec: [value@1 DESC], fetch=10
-----SortExec: TopK(fetch=10), expr=[value@1 DESC]
-------ProjectionExec: expr=[ps_partkey@0 as ps_partkey, 
SUM(partsupp.ps_supplycost * partsupp.ps_availqty)@1 as value]
---------NestedLoopJoinExec: join_type=Inner, 
filter=CAST(SUM(partsupp.ps_supplycost * partsupp.ps_availqty)@0 AS 
Decimal128(38, 15)) > SUM(partsupp.ps_supplycost * partsupp.ps_availqty) * 
Float64(0.0001)@1
+--SortExec: TopK(fetch=10), expr=[value@1 DESC]
+----ProjectionExec: expr=[ps_partkey@0 as ps_partkey, 
SUM(partsupp.ps_supplycost * partsupp.ps_availqty)@1 as value]
+------NestedLoopJoinExec: join_type=Inner, 
filter=CAST(SUM(partsupp.ps_supplycost * partsupp.ps_availqty)@0 AS 
Decimal128(38, 15)) > SUM(partsupp.ps_supplycost * partsupp.ps_availqty) * 
Float64(0.0001)@1
+--------CoalescePartitionsExec

Review Comment:
   Yes, inner (always left) input must be collected into single partition, and 
outer (always right) input is executed in parallel. In cases reordering is not 
happening due to lacking / misestimated  statistics -- it'll also cause lack of 
parallelism. 



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