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

   ### What changes were proposed in this pull request?
   
   This PR adds support estimate column statistics if it is foldable 
expression. For example: estimate the `'a' AS a`'s column statistics from 
`SELECT 'a' AS a FROM tbl`.
   
   1. If the foldable expression is null:
      ```scala
      ColumnStat(Some(0), None, None, Some(rowCount), Some(size), Some(size), 
None, 2)
      ```
   2. If the foldable expression is not null:
      ```scala
      ColumnStat(Some(1), Some(value), Some(value), Some(0), Some(size), 
Some(size), None, 2)
      ```
   
   ### Why are the changes needed?
   
   Improve column statistics.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   Unit test.


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