GitHub user wzhfy opened a pull request:

    https://github.com/apache/spark/pull/16243

    [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

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/wzhfy/spark nullStats

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/16243.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #16243
    
----
commit 674cd7cac3d542f1b1379fef416e3fce2bbc8cbc
Author: wangzhenhua <[email protected]>
Date:   2016-12-10T03:19:19Z

    use default size for null columns

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to