maryannxue opened a new pull request #27551: [SPARK-30528] Turn off DPP 
subquery duplication by default
URL: https://github.com/apache/spark/pull/27551
 
 
   ### What changes were proposed in this pull request?
   This PR adds a config for Dynamic Partition Pruning subquery duplication and 
turns it off by default due to its potential performance regression.
   When planning a DPP filter, it seeks to reuse the broadcast exchange 
relation if the corresponding join is a BHJ with the filter relation being on 
the build side, otherwise it will either opt out or plan the filter as an 
un-reusable subquery duplication based on the cost estimate. However, the cost 
estimate is not accurate and only takes into account the table scan overhead, 
thus adding an un-reusable subquery duplication DPP filter can sometimes cause 
perf regression.
   This PR turns off the subquery duplication DPP filter by:
   1. adding a config 
`spark.sql.optimizer.dynamicPartitionPruning.reuseBroadcastOnly` and setting it 
`true` by default.
   2. remove the existing meaningless config 
`spark.sql.optimizer.dynamicPartitionPruning.reuseBroadcast` since we always 
want to reuse broadcast results if possible. 
   
   ### Why are the changes needed?
   This is to fix a potential performance regression caused by DPP.
   
   ### Does this PR introduce any user-facing change?
   No.
   
   ### How was this patch tested?
   Updated DynamicPartitionPruningSuite to test the new configuration.
   

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to