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

2017-08-10 Thread Rui Li (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-16945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rui Li updated HIVE-16945:
--
   Resolution: Fixed
Fix Version/s: 3.0.0
   Status: Resolved  (was: Patch Available)

Test failures not related. Pushed to master. Thanks [~jcamachorodriguez] for 
the review.

> 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
>Assignee: Rui Li
> Fix For: 3.0.0
>
> Attachments: HIVE-16945.1.patch, HIVE-16945.2.patch, 
> HIVE-16945.3.patch
>
>
> 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 {{logicalEquals(Operator other)}} 
> method.



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


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

2017-08-09 Thread Rui Li (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-16945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rui Li updated HIVE-16945:
--
Attachment: HIVE-16945.3.patch

[~jcamachorodriguez], nice catch. Update to address the comment.

> 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
>Assignee: Rui Li
> Attachments: HIVE-16945.1.patch, HIVE-16945.2.patch, 
> HIVE-16945.3.patch
>
>
> 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 {{logicalEquals(Operator other)}} 
> method.



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


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

2017-07-28 Thread Rui Li (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-16945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rui Li updated HIVE-16945:
--
Attachment: HIVE-16945.2.patch

Fix NPE

> 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
>Assignee: Rui Li
> Attachments: HIVE-16945.1.patch, HIVE-16945.2.patch
>
>
> 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 {{logicalEquals(Operator other)}} 
> method.



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


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

2017-07-27 Thread Rui Li (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-16945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rui Li updated HIVE-16945:
--
Status: Patch Available  (was: Open)

> 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
>Assignee: Rui Li
> Attachments: HIVE-16945.1.patch
>
>
> 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 {{logicalEquals(Operator other)}} 
> method.



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


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

2017-07-27 Thread Rui Li (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-16945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rui Li updated HIVE-16945:
--
Attachment: HIVE-16945.1.patch

Since we're essentially comparing OperatorDesc of each operator, patch v1 just 
removes OperatorComparatorFactory and moves the logic to each OperatorDesc - so 
that we can reuse code.

> 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
>Assignee: Rui Li
> Attachments: HIVE-16945.1.patch
>
>
> 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 {{logicalEquals(Operator other)}} 
> method.



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


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

2017-07-20 Thread Jesus Camacho Rodriguez (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-16945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jesus Camacho Rodriguez updated HIVE-16945:
---
Description: 
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 {{logicalEquals(Operator other)}} method.

  was:
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.


> 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 {{logicalEquals(Operator other)}} 
> method.



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