Hive
  1. Hive
  2. HIVE-4798

NPE when we call isSame from an instance of ExprNodeConstantDesc with null value

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.12.0
    • Component/s: None
    • Labels:
      None

      Description

      Take a look at the code

        @Override
        public boolean isSame(Object o) {
          if (!(o instanceof ExprNodeConstantDesc)) {
            return false;
          }
          ExprNodeConstantDesc dest = (ExprNodeConstantDesc) o;
          if (!typeInfo.equals(dest.getTypeInfo())) {
            return false;
          }
          if (!value.equals(dest.getValue())) {
            return false;
          }
      
          return true;
        }
      

      value is an Object.

        Activity

        Hide
        Yin Huai added a comment -

        If there are two instances of ExprNodeConstantDesc and their values are both null, I think that it is reasonable to return true from isSame.

        Show
        Yin Huai added a comment - If there are two instances of ExprNodeConstantDesc and their values are both null, I think that it is reasonable to return true from isSame.
        Hide
        Ashutosh Chauhan added a comment -

        I agree. Can you provide a patch for it?

        Show
        Ashutosh Chauhan added a comment - I agree. Can you provide a patch for it?
        Hide
        Ashutosh Chauhan added a comment -

        +1

        Show
        Ashutosh Chauhan added a comment - +1
        Hide
        Ashutosh Chauhan added a comment -

        Committed to trunk. Thanks, Yin!

        Show
        Ashutosh Chauhan added a comment - Committed to trunk. Thanks, Yin!
        Hide
        Hudson added a comment -

        Integrated in Hive-trunk-h0.21 #2171 (See https://builds.apache.org/job/Hive-trunk-h0.21/2171/)
        HIVE-4798 : NPE when we call isSame from an instance of ExprNodeConstantDesc with null value (Yin Huai via Ashutosh Chauhan) (Revision 1498151)

        Result = FAILURE
        hashutosh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1498151
        Files :

        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/ExprNodeConstantDesc.java
        Show
        Hudson added a comment - Integrated in Hive-trunk-h0.21 #2171 (See https://builds.apache.org/job/Hive-trunk-h0.21/2171/ ) HIVE-4798 : NPE when we call isSame from an instance of ExprNodeConstantDesc with null value (Yin Huai via Ashutosh Chauhan) (Revision 1498151) Result = FAILURE hashutosh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1498151 Files : /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/ExprNodeConstantDesc.java
        Hide
        Hudson added a comment -

        Integrated in Hive-trunk-hadoop2 #266 (See https://builds.apache.org/job/Hive-trunk-hadoop2/266/)
        HIVE-4798 : NPE when we call isSame from an instance of ExprNodeConstantDesc with null value (Yin Huai via Ashutosh Chauhan) (Revision 1498151)

        Result = FAILURE
        hashutosh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1498151
        Files :

        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/ExprNodeConstantDesc.java
        Show
        Hudson added a comment - Integrated in Hive-trunk-hadoop2 #266 (See https://builds.apache.org/job/Hive-trunk-hadoop2/266/ ) HIVE-4798 : NPE when we call isSame from an instance of ExprNodeConstantDesc with null value (Yin Huai via Ashutosh Chauhan) (Revision 1498151) Result = FAILURE hashutosh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1498151 Files : /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/ExprNodeConstantDesc.java
        Hide
        Ashutosh Chauhan added a comment -

        This issue has been fixed and released as part of 0.12 release. If you find further issues, please create a new jira and link it to this one.

        Show
        Ashutosh Chauhan added a comment - This issue has been fixed and released as part of 0.12 release. If you find further issues, please create a new jira and link it to this one.

          People

          • Assignee:
            Yin Huai
            Reporter:
            Yin Huai
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development