my-vegetable-has-exploded commented on code in PR #9676:
URL: https://github.com/apache/arrow-datafusion/pull/9676#discussion_r1533157921


##########
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:
   > In case reordering is not happening due to lacking / misestimated 
statistics -- it'll also cause lack of parallelism.
   
   `should_swap_join_order` is based on `total_byte_size`.  It would become 
`Precision::Absent` after some operator like `AggregateExec` and 
`ProjectionExec`.  I don't know whether it is a good idea to add a check by 
`num_rows`. 
   



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