You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by stanzhai <gi...@git.apache.org> on 2017/02/09 13:53:15 UTC

[GitHub] spark pull request #16874: [SPARK-19509][SQL][branch-2.1]Fix a NPE problem i...

GitHub user stanzhai opened a pull request:

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

    [SPARK-19509][SQL][branch-2.1]Fix a NPE problem in grouping sets when using an empty column

    ## What changes were proposed in this pull request?
    
    If a column of a table is all null values, the follow SQL will throw an NPE: `select count(1) from test group by e grouping sets(e)`.
    
    The reason is that when transformUp a `GroupingSets` in `ResolveGroupingAnalytics` it uses a `nullBitmask` to set an attribute with null ability, the nullable attribute may be modified.
    
    This pr just set all attribute's null ability to `true` in group by  expressions to fix the problem.
    
    The pr #15484 in master branch has fixed this problem. 
    
    ## How was this patch tested?
    
    Test with Hive in my environment.

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

    $ git pull https://github.com/stanzhai/spark fix-grouping-sets

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

    https://github.com/apache/spark/pull/16874.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 #16874
    
----
commit 3690cb29a3c15903dd6290502fb736daa99157b4
Author: Stan Zhai <zh...@haizhi.com>
Date:   2017-02-09T13:22:02Z

    fix a NPE issue of grouping sets

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #16874: [SPARK-19509][SQL]Fix a NPE problem in grouping s...

Posted by stanzhai <gi...@git.apache.org>.
Github user stanzhai closed the pull request at:

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


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #16874: [SPARK-19509][SQL]Fix a NPE problem in grouping sets whe...

Posted by hvanhovell <gi...@git.apache.org>.
Github user hvanhovell commented on the issue:

    https://github.com/apache/spark/pull/16874
  
    @stanzhai I have merged my PR, and assigned the PR to your name. Could you close this?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #16874: [SPARK-19509][SQL]Fix a NPE problem in grouping sets whe...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16874
  
    Can one of the admins verify this patch?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org