spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davies <...@git.apache.org>
Subject [GitHub] spark pull request #15416: [SPARK-17849] [SQL] Fix NPE problem when using gr...
Date Tue, 11 Oct 2016 03:44:40 GMT
Github user davies commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15416#discussion_r82720505
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
---
    @@ -298,10 +298,14 @@ class Analyzer(
               case other => Alias(other, other.toString)()
             }
     
    -        val nonNullBitmask = x.bitmasks.reduce(_ & _)
    +        // The left most bit in the bitmasks corresponds to the last expression in groupByAliases
    +        // with 0 indicating this expression is in the grouping set. The following line
of code
    +        // calculates the bit mask representing the expressions that exist in all the
grouping sets.
    +        val nonNullBitmask = ~ x.bitmasks.reduce(_ | _)
    --- End diff --
    
    Could you remove the '~' here, and use `(nonNullBitmask & (1 << (attrLength
- idx - 1))) == 1`?


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


Mime
View raw message