You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2021/11/25 09:35:08 UTC

[GitHub] [calcite] shpodg opened a new pull request #2617: fix parameter order of rebuilding PLUS/TIMES

shpodg opened a new pull request #2617:
URL: https://github.com/apache/calcite/pull/2617


   The SqlDatetimePlusOperator parameter order can not be changed 


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

To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org

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



[GitHub] [calcite] vlsi commented on a change in pull request #2617: fix parameter order of rebuilding PLUS/TIMES

Posted by GitBox <gi...@apache.org>.
vlsi commented on a change in pull request #2617:
URL: https://github.com/apache/calcite/pull/2617#discussion_r756813083



##########
File path: core/src/main/java/org/apache/calcite/plan/SubstitutionVisitor.java
##########
@@ -376,7 +376,7 @@ private static RexNode canonizeNode(RexBuilder rexBuilder, RexNode condition) {
         return rexBuilder.makeCall(call.getOperator(), left, right);
       }
 
-      RexNode newCall = rexBuilder.makeCall(call.getOperator(), right, left);
+      RexNode newCall = rexBuilder.makeCall(call.getOperator(), left, right);

Review comment:
       Please create a branch for the PR next time. PRs from master branches do not really work well.




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

To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org

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



[GitHub] [calcite] shpodg commented on a change in pull request #2617: fix parameter order of rebuilding PLUS/TIMES

Posted by GitBox <gi...@apache.org>.
shpodg commented on a change in pull request #2617:
URL: https://github.com/apache/calcite/pull/2617#discussion_r756801826



##########
File path: core/src/main/java/org/apache/calcite/plan/SubstitutionVisitor.java
##########
@@ -376,7 +376,7 @@ private static RexNode canonizeNode(RexBuilder rexBuilder, RexNode condition) {
         return rexBuilder.makeCall(call.getOperator(), left, right);
       }
 
-      RexNode newCall = rexBuilder.makeCall(call.getOperator(), right, left);
+      RexNode newCall = rexBuilder.makeCall(call.getOperator(), left, right);

Review comment:
       Thanks for review ,I have a testcase that can prove it and I will open an another 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.

To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org

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



[GitHub] [calcite] vlsi commented on a change in pull request #2617: fix parameter order of rebuilding PLUS/TIMES

Posted by GitBox <gi...@apache.org>.
vlsi commented on a change in pull request #2617:
URL: https://github.com/apache/calcite/pull/2617#discussion_r756761512



##########
File path: core/src/main/java/org/apache/calcite/plan/SubstitutionVisitor.java
##########
@@ -376,7 +376,7 @@ private static RexNode canonizeNode(RexBuilder rexBuilder, RexNode condition) {
         return rexBuilder.makeCall(call.getOperator(), left, right);
       }
 
-      RexNode newCall = rexBuilder.makeCall(call.getOperator(), right, left);
+      RexNode newCall = rexBuilder.makeCall(call.getOperator(), left, right);

Review comment:
       I believe it is not an error.
   The reordering is intentional: note the comparison in the previous line




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

To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org

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