-
- Downloads
[SPARK-18815][SQL] Fix NPE when collecting column stats for string/binary...
[SPARK-18815][SQL] Fix NPE when collecting column stats for string/binary column having only null values ## What changes were proposed in this pull request? During column stats collection, average and max length will be null if a column of string/binary type has only null values. To fix this, I use default size when avg/max length is null. ## How was this patch tested? Add a test for handling null columns Author: wangzhenhua <wangzhenhua@huawei.com> Closes #16243 from wzhfy/nullStats. (cherry picked from commit a29ee55a) Signed-off-by:Reynold Xin <rxin@databricks.com>
Showing
- sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/Statistics.scala 6 additions, 3 deletions.../apache/spark/sql/catalyst/plans/logical/Statistics.scala
- sql/core/src/test/scala/org/apache/spark/sql/StatisticsCollectionSuite.scala 47 additions, 20 deletions...cala/org/apache/spark/sql/StatisticsCollectionSuite.scala
Please register or sign in to comment