amaliujia commented on a change in pull request #1475: [CALCITE-3371]
BinaryExpression evaluate method support Mod
URL: https://github.com/apache/calcite/pull/1475#discussion_r328797329
##########
File path: linq4j/src/main/java/org/apache/calcite/linq4j/tree/Expressions.java
##########
@@ -86,6 +86,14 @@ public static BinaryExpression add(Expression left,
Expression right,
throw Extensions.todo();
}
+ /**
+ * Creates a BinaryExpression that represents an arithmetic
+ * mod operation that does not have overflow checking.
Review comment:
I was curious on how `mod` can cause overflow, so searched a bit and found:
https://stackoverflow.com/questions/19285163/does-modulus-overflow
Just FYI, if there is a need to check overflow, the link proposes a way
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services