You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Yin Huai (JIRA)" <ji...@apache.org> on 2013/06/28 23:29:20 UTC

[jira] [Commented] (HIVE-4798) NPE when we call isSame from an instance of ExprNodeConstantDesc with null value

    [ https://issues.apache.org/jira/browse/HIVE-4798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13695820#comment-13695820 ] 

Yin Huai commented on HIVE-4798:
--------------------------------

If there are two instances of ExprNodeConstantDesc and their values are both null, I think that it is reasonable to return true from isSame.
                
> NPE when we call isSame from an instance of ExprNodeConstantDesc with null value
> --------------------------------------------------------------------------------
>
>                 Key: HIVE-4798
>                 URL: https://issues.apache.org/jira/browse/HIVE-4798
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Yin Huai
>            Assignee: Yin Huai
>
> Take a look at the code
> {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;
>   }
> {\code}
> value is an Object.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira