LantaoJin edited a comment on pull request #29120:
URL: https://github.com/apache/spark/pull/29120#issuecomment-659816264


   @manuzhang This is for performance improvement. COALESCE with join will 
reduce the SMJ operator parallelism. The user case is our internal function: 
download. Download the query result by one file. We use a COALESCE hint to 
implement it. But when the join in the query, the parallelism reduced to 1 in 
the Join operator.
   Forget above user case, the query `spark.sql("select /*+ COALESCE(1) */ t1.* 
from t1 join t2 on (t1.id = t2.id)").show` is very slow due to low parallelism 
in the stage of SMJ. We can optimize it.


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

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to