wangyum opened a new pull request, #37069:
URL: https://github.com/apache/spark/pull/37069

   ### What changes were proposed in this pull request?
   
   This PR adds `ANALYZE TABLE tbl COMPUTE STATISTICS;` as a workaround when 
there is not enough memory to build and broadcast the table.
   
   ### Why are the changes needed?
   
   The current workaround has the following disadvantages:
   1. Setting `spark.sql.autoBroadcastJoinThreshold` to -1 will disable all 
broadcast joins.
   2. We don't know the specific value of `spark.driver.memory` should be set.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   Manual testing:
   ```
   Not enough memory to build and broadcast the table to all worker nodes. As a 
workaround, you can either disable broadcast by setting 
spark.sql.autoBroadcastJoinThreshold to -1 or increase the spark driver memory 
by setting spark.driver.memory to a higher value or analyze these tables 
through: ANALYZE TABLE `tpds5t`.`item` COMPUTE STATISTICS;."
   ```


-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to