You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by viirya <gi...@git.apache.org> on 2015/12/01 17:17:00 UTC

[GitHub] spark pull request: [Minor][SQL] Check bitmasks to set nullable pr...

GitHub user viirya opened a pull request:

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

    [Minor][SQL] Check bitmasks to set nullable property

    Following up #10038.
    
    We can use bitmasks to determine which grouping expressions need to be set as nullable.
    
    cc @yhuai 

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

    $ git pull https://github.com/viirya/spark-1 fix-cube-following

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

    https://github.com/apache/spark/pull/10067.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 #10067
    
----
commit 69be01dd36af7badd84725ecd87f8f7a0cdbbf42
Author: Liang-Chi Hsieh <vi...@appier.com>
Date:   2015-12-01T16:12:55Z

    Check bitmasks to set nullable property.

----


---
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: [SPARK-11949][SQL] Check bitmasks to set nulla...

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

    https://github.com/apache/spark/pull/10067#issuecomment-161187003
  
    Merged build finished. Test PASSed.


---
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: [SPARK-11949][SQL] Check bitmasks to set nulla...

Posted by yhuai <gi...@git.apache.org>.
Github user yhuai commented on the pull request:

    https://github.com/apache/spark/pull/10067#issuecomment-161188084
  
    Thanks! Merging to master and branch 1.6.


---
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: [Minor][SQL] Check bitmasks to set nullable pr...

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

    https://github.com/apache/spark/pull/10067#issuecomment-161037166
  
    Merged build finished. Test FAILed.


---
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: [SPARK-11949][SQL] Check bitmasks to set nulla...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10067#issuecomment-161175563
  
    **[Test build #47035 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47035/consoleFull)** for PR 10067 at commit [`723d24a`](https://github.com/apache/spark/commit/723d24ab6a89a09b90d9de65a0e72f0c07bfef4b).


---
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: [SPARK-11949][SQL] Check bitmasks to set nulla...

Posted by hvanhovell <gi...@git.apache.org>.
Github user hvanhovell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10067#discussion_r46353257
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala ---
    @@ -223,10 +223,13 @@ class Analyzer(
               case other => Alias(other, other.toString)()
             }
     
    -        // TODO: We need to use bitmasks to determine which grouping expressions need to be
    -        // set as nullable. For example, if we have GROUPING SETS ((a,b), a), we do not need
    -        // to change the nullability of a.
    -        val attributeMap = groupByAliases.map(a => (a -> a.toAttribute.withNullability(true))).toMap
    +        val attributeMap = groupByAliases.zipWithIndex.map { case (a, idx) =>
    +          if (x.bitmasks.exists(bitmask => (bitmask & 1 << idx) == 0)) {
    +            (a -> a.toAttribute.withNullability(true))
    +          } else {
    +            (a -> a.toAttribute)
    +          }
    +        }.toMap
    --- End diff --
    
    It is the same thing. I only suggested to aggregate the bitmap in advance: ```val nonNullBitmask = x.bitmasks.reduce(_ & _)``` and to use the ```nonNullBitmask``` to check for (non) nullability in the loop. It should be a tiny tiny tiny bit quicker (no re-iteration required , and less one closure).


---
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: [Minor][SQL] Check bitmasks to set nullable pr...

Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on the pull request:

    https://github.com/apache/spark/pull/10067#issuecomment-161018842
  
    I think this should not need a JIRA. If it is needed, please let me know. Thanks.


---
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: [Minor][SQL] Check bitmasks to set nullable pr...

Posted by yhuai <gi...@git.apache.org>.
Github user yhuai commented on the pull request:

    https://github.com/apache/spark/pull/10067#issuecomment-161055249
  
    How about we use the original jira number?


---
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: [SPARK-11949][SQL] Check bitmasks to set nulla...

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

    https://github.com/apache/spark/pull/10067#issuecomment-161187004
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/47035/
    Test PASSed.


---
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: [SPARK-11949][SQL] Check bitmasks to set nulla...

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

    https://github.com/apache/spark/pull/10067#issuecomment-161156468
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/47016/
    Test FAILed.


---
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: [Minor][SQL] Check bitmasks to set nullable pr...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10067#issuecomment-161020447
  
    **[Test build #46965 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/46965/consoleFull)** for PR 10067 at commit [`69be01d`](https://github.com/apache/spark/commit/69be01dd36af7badd84725ecd87f8f7a0cdbbf42).


---
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: [Minor][SQL] Check bitmasks to set nullable pr...

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

    https://github.com/apache/spark/pull/10067#issuecomment-161037168
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/46965/
    Test FAILed.


---
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: [Minor][SQL] Check bitmasks to set nullable pr...

Posted by yhuai <gi...@git.apache.org>.
Github user yhuai commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10067#discussion_r46317304
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala ---
    @@ -223,10 +223,13 @@ class Analyzer(
               case other => Alias(other, other.toString)()
             }
     
    -        // TODO: We need to use bitmasks to determine which grouping expressions need to be
    -        // set as nullable. For example, if we have GROUPING SETS ((a,b), a), we do not need
    -        // to change the nullability of a.
    -        val attributeMap = groupByAliases.map(a => (a -> a.toAttribute.withNullability(true))).toMap
    +        val attributeMap = groupByAliases.zipWithIndex.map { case (a, idx) =>
    +          if (x.bitmasks.exists(bitmask => (bitmask & 1 << idx) == 0)) {
    +            (a -> a.toAttribute.withNullability(true))
    +          } else {
    +            (a -> a.toAttribute)
    +          }
    +        }.toMap
    --- End diff --
    
    https://github.com/apache/spark/commit/c87531b765f8934a9a6c0f673617e0abfa5e5f0e#commitcomment-14712726 looks like a good idea.


---
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: [SPARK-11949][SQL] Check bitmasks to set nulla...

Posted by yhuai <gi...@git.apache.org>.
Github user yhuai commented on the pull request:

    https://github.com/apache/spark/pull/10067#issuecomment-161388052
  
    no problem!


---
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: [SPARK-11949][SQL] Check bitmasks to set nulla...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10067#issuecomment-161142157
  
    **[Test build #47006 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47006/consoleFull)** for PR 10067 at commit [`69be01d`](https://github.com/apache/spark/commit/69be01dd36af7badd84725ecd87f8f7a0cdbbf42).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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: [SPARK-11949][SQL] Check bitmasks to set nulla...

Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on the pull request:

    https://github.com/apache/spark/pull/10067#issuecomment-161194848
  
    @yhuai Thank you.


---
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: [SPARK-11949][SQL] Check bitmasks to set nulla...

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

    https://github.com/apache/spark/pull/10067#issuecomment-161142317
  
    Merged build finished. Test PASSed.


---
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: [Minor][SQL] Check bitmasks to set nullable pr...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10067#issuecomment-161037059
  
    **[Test build #46965 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/46965/consoleFull)** for PR 10067 at commit [`69be01d`](https://github.com/apache/spark/commit/69be01dd36af7badd84725ecd87f8f7a0cdbbf42).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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: [SPARK-11949][SQL] Check bitmasks to set nulla...

Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on the pull request:

    https://github.com/apache/spark/pull/10067#issuecomment-161174995
  
    retest this please.


---
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: [SPARK-11949][SQL] Check bitmasks to set nulla...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10067#issuecomment-161156403
  
    **[Test build #47016 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47016/consoleFull)** for PR 10067 at commit [`723d24a`](https://github.com/apache/spark/commit/723d24ab6a89a09b90d9de65a0e72f0c07bfef4b).
     * This patch **fails PySpark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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: [SPARK-11949][SQL] Check bitmasks to set nulla...

Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on the pull request:

    https://github.com/apache/spark/pull/10067#issuecomment-161120009
  
    retest this please.


---
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: [SPARK-11949][SQL] Check bitmasks to set nulla...

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

    https://github.com/apache/spark/pull/10067#issuecomment-161142319
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/47006/
    Test PASSed.


---
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: [SPARK-11949][SQL] Check bitmasks to set nulla...

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

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


---
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: [SPARK-11949][SQL] Check bitmasks to set nulla...

Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10067#discussion_r46358991
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala ---
    @@ -223,10 +223,13 @@ class Analyzer(
               case other => Alias(other, other.toString)()
             }
     
    -        // TODO: We need to use bitmasks to determine which grouping expressions need to be
    -        // set as nullable. For example, if we have GROUPING SETS ((a,b), a), we do not need
    -        // to change the nullability of a.
    -        val attributeMap = groupByAliases.map(a => (a -> a.toAttribute.withNullability(true))).toMap
    +        val attributeMap = groupByAliases.zipWithIndex.map { case (a, idx) =>
    +          if (x.bitmasks.exists(bitmask => (bitmask & 1 << idx) == 0)) {
    +            (a -> a.toAttribute.withNullability(true))
    +          } else {
    +            (a -> a.toAttribute)
    +          }
    +        }.toMap
    --- End diff --
    
    Thanks. That's cool. I updated this according to your suggestion.


---
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: [SPARK-11949][SQL] Check bitmasks to set nulla...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10067#issuecomment-161120895
  
    **[Test build #47006 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47006/consoleFull)** for PR 10067 at commit [`69be01d`](https://github.com/apache/spark/commit/69be01dd36af7badd84725ecd87f8f7a0cdbbf42).


---
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: [SPARK-11949][SQL] Check bitmasks to set nulla...

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

    https://github.com/apache/spark/pull/10067#issuecomment-161156465
  
    Merged build finished. Test FAILed.


---
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: [SPARK-11949][SQL] Check bitmasks to set nulla...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10067#issuecomment-161137603
  
    **[Test build #47016 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47016/consoleFull)** for PR 10067 at commit [`723d24a`](https://github.com/apache/spark/commit/723d24ab6a89a09b90d9de65a0e72f0c07bfef4b).


---
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: [SPARK-11949][SQL] Check bitmasks to set nulla...

Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10067#discussion_r46350803
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala ---
    @@ -223,10 +223,13 @@ class Analyzer(
               case other => Alias(other, other.toString)()
             }
     
    -        // TODO: We need to use bitmasks to determine which grouping expressions need to be
    -        // set as nullable. For example, if we have GROUPING SETS ((a,b), a), we do not need
    -        // to change the nullability of a.
    -        val attributeMap = groupByAliases.map(a => (a -> a.toAttribute.withNullability(true))).toMap
    +        val attributeMap = groupByAliases.zipWithIndex.map { case (a, idx) =>
    +          if (x.bitmasks.exists(bitmask => (bitmask & 1 << idx) == 0)) {
    +            (a -> a.toAttribute.withNullability(true))
    +          } else {
    +            (a -> a.toAttribute)
    +          }
    +        }.toMap
    --- End diff --
    
    I think we did the same thing? 


---
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: [SPARK-11949][SQL] Check bitmasks to set nulla...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10067#issuecomment-161186914
  
    **[Test build #47035 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47035/consoleFull)** for PR 10067 at commit [`723d24a`](https://github.com/apache/spark/commit/723d24ab6a89a09b90d9de65a0e72f0c07bfef4b).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


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