korowa commented on code in PR #8020: URL: https://github.com/apache/arrow-datafusion/pull/8020#discussion_r1385341824
########## datafusion/sqllogictest/test_files/join_disable_repartition_joins.slt: ########## @@ -72,11 +72,11 @@ SELECT t1.a, t1.b, t1.c, t2.a as a2 ON t1.d = t2.d ORDER BY a2, t2.b LIMIT 5 ---- -0 0 0 0 -0 0 2 0 -0 0 3 0 -0 0 6 0 -0 0 20 0 +1 3 95 0 Review Comment: I agree that build-side order is not that important (at least for majority of cases -- anyway it will be affected by probe-side ordering), but on the other side it's reasonable not to break current behaviour. At first glance, the cost is increase of `join_build_time` caused by switching current `JoinHashMap` building [process](https://github.com/apache/arrow-datafusion/blob/f3c9009e50fdb5811c522bfb07ba29ac04cd1d22/datafusion/physical-plan/src/joins/hash_join.rs#L729) from LIFO (last value stored in map) to FIFO (first value stored in map) -- it'll probably require more traversals over `JoinHashMap.next` to place all the elements, and affect joins with high share of non-unique values on build side. -- 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]
