You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Rui Li (JIRA)" <ji...@apache.org> on 2017/07/20 08:19:00 UTC

[jira] [Commented] (HIVE-16945) Add method to compare Operators

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

Rui Li commented on HIVE-16945:
-------------------------------

Hi [~jcamachorodriguez], I suppose this won't need to change the {{equals}} or {{hashCode}} of Operator right? And maybe "logicalEquals" would be a better name for the new method (since compareTo usually returns an int)?

> Add method to compare Operators 
> --------------------------------
>
>                 Key: HIVE-16945
>                 URL: https://issues.apache.org/jira/browse/HIVE-16945
>             Project: Hive
>          Issue Type: Improvement
>          Components: Operators
>    Affects Versions: 3.0.0
>            Reporter: Jesus Camacho Rodriguez
>
> HIVE-10844 introduced a comparator factory class for operators that encapsulates all the logic to assess whether two operators are equal:
> https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/optimizer/OperatorComparatorFactory.java
> The current design might create problems as any change in fields of operators will break the comparators. It would be better to do this via inheritance from Operator base class, by adding a {{compareTo(Operator other)}} method.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)