LuciferYang commented on code in PR #60025:
URL: https://github.com/apache/spark/pull/60025#discussion_r4539036368


##########
docs/sql-migration-guide.md:
##########
@@ -24,6 +24,7 @@ license: |
 
 ## Upgrading from Spark SQL 4.4 to 5.0
 
+- Since Spark 5.0, when `spark.sql.cbo.enabled` is `true`, the optimizer 
estimates plans over analyzed `CHAR` columns from their column statistics, as 
it does for `STRING` columns. Since Spark 3.4, read-side `CHAR` padding 
(`spark.sql.readSideCharPadding`, `true` by default) hid these statistics, so, 
for example, a filter on a `CHAR` partition column was estimated to keep every 
row. The estimate assumes evenly distributed values, so for a skewed partition 
it can now be smaller than the data, and the pruned relation can become small 
enough to be broadcast. This also applies to partition pruning when only 
`spark.sql.cbo.planStats.enabled` is `true`.

Review Comment:
   Added in be2a982b222.



-- 
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: [email protected]

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