maryannxue edited a comment on issue #23759: [SPARK-26840][SQL] Avoid 
cost-based join reorder in presence of join hints
URL: https://github.com/apache/spark/pull/23759#issuecomment-462488318
 
 
   @dongjoon-hyun, I just pushed in the latest changes together with two new 
tests.
   The changes in "extractInnerJoins" are necessary for the first added test. 
The changes (which you suggested) in "replaceWithOrderedJoins" are necessary 
for the second test.
   Once the join items (with number > 2) are extracted by `extractInnerJoins`, 
they will be reordered, thus the hint info will be lost; once reordered, 
regardless of whether the join order has changed, the join operators should be 
marked "ordered" (replaced with `OrderedJoin`) to prevent further transform.
   The test I enabled with CBO in `JoinHintsSuite` did not have more than two 
extracted join items, so it did not go through the real reorder logic, and 
that's why you one-liner worked.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to