fuwhu opened a new pull request #26805: [SPARK-15616][SQL] Add optimizer rule 
PruneHiveTablePartitions
URL: https://github.com/apache/spark/pull/26805
 
 
   ### What changes were proposed in this pull request?
   Add optimizer rule PruneHiveTablePartitions pruning hive table partitions 
based on filters on partition columns.
   Doing so, the total size of pruned partitions may be small enough for 
broadcast join in JoinSelection strategy.
   
   ### Why are the changes needed?
   In JoinSelection strategy, spark use the "plan.stats.sizeInBytes" to decide 
whether the plan is suitable for broadcast join.
   Currently, "plan.stats.sizeInBytes" does not take "pruned partitions" into 
account, so it may miss some broadcast join and take sort-merge join instead, 
which will definitely impact join performance.
   This PR aim at taking "pruned partitions" into account for hive table in 
"plan.stats.sizeInBytes" and then improve performance by using broadcast join 
if possible.
   
   ### Does this PR introduce any user-facing change?
   no
   
   ### How was this patch tested?
   Added unit tests.
   
   This is based on #25919, credits should go to @lianhuiwang and @advancedxy.
   

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


With regards,
Apache Git Services

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

Reply via email to