You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/06/03 04:05:38 UTC

[GitHub] [incubator-doris] yangzhg opened a new pull request #3753: [FIX] fix binaryPredicte's equals function ignore op

yangzhg opened a new pull request #3753:
URL: https://github.com/apache/incubator-doris/pull/3753


   BinaryPredicte's equals funtion compare by opccode ,
   but the opcode is never inited, 
   so it will return true if this child is same,  for example `a>1` and `a<1` are equal


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] kangkaisen commented on a change in pull request #3753: [FIX] fix binaryPredicte's equals function ignore op

Posted by GitBox <gi...@apache.org>.
kangkaisen commented on a change in pull request #3753:
URL: https://github.com/apache/incubator-doris/pull/3753#discussion_r434307639



##########
File path: fe/src/main/java/org/apache/doris/analysis/BinaryPredicate.java
##########
@@ -225,7 +226,7 @@ public boolean equals(Object obj) {
         if (!super.equals(obj)) {
             return false;
         }
-        return ((BinaryPredicate) obj).opcode == this.opcode;
+        return ((BinaryPredicate) obj).opcode == this.opcode && op.equals(((BinaryPredicate) obj).getOp());

Review comment:
       I think only compare op is enough.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman commented on a change in pull request #3753: [FIX] fix binaryPredicte's equals function ignore op

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #3753:
URL: https://github.com/apache/incubator-doris/pull/3753#discussion_r434328016



##########
File path: fe/src/main/java/org/apache/doris/analysis/BinaryPredicate.java
##########
@@ -225,7 +226,7 @@ public boolean equals(Object obj) {
         if (!super.equals(obj)) {
             return false;
         }
-        return ((BinaryPredicate) obj).opcode == this.opcode;
+        return ((BinaryPredicate) obj).opcode == this.opcode && op.equals(((BinaryPredicate) obj).getOp());

Review comment:
       It only for safe, don't know what the `opcode` for.
   If it is useless, we can remove it in next PR.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman merged pull request #3753: [FIX] fix binaryPredicte's equals function ignore op

Posted by GitBox <gi...@apache.org>.
morningman merged pull request #3753:
URL: https://github.com/apache/incubator-doris/pull/3753


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org