wangyum commented on pull request #29709:
URL: https://github.com/apache/spark/pull/29709#issuecomment-690328789


   > Can't we just do this automatically by applying the "would this be small
   enough to broadcast" criterion instead of looking at the "is this actually
   selected for broadcast"?
   
   First of all, this is a `SortMergeJoin`. To use DPP, you need to disable 
`spark.sql.optimizer.dynamicPartitionPruning.reuseBroadcastOnly`. But disabling 
`spark.sql.optimizer.dynamicPartitionPruning.reuseBroadcastOnly` may affect 
other Join.
   
   Second, the statistics of the plan are usually inaccurate, which makes us 
unable to determine whether it is suitable for broadcasting in the plan phase.
   
   So, I think it’s most appropriate to add hint.
   


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