danny0405 commented on a change in pull request #1379:
[CALCITE-3251]BinaryExpression evaluate method support Long type.
URL: https://github.com/apache/calcite/pull/1379#discussion_r315183521
##########
File path:
linq4j/src/main/java/org/apache/calcite/linq4j/tree/BinaryExpression.java
##########
@@ -58,9 +58,18 @@ public Object evaluate(Evaluator evaluator) {
case INT:
return (Integer) expression0.evaluate(evaluator) + (Integer)
expression1
.evaluate(evaluator);
+ case BYTE:
+ return (Byte) expression0.evaluate(evaluator) + (Byte) expression1
+ .evaluate(evaluator);
Review comment:
How about the `SHORT` type ? I think you should cover all the numeric types
defined in Primitive.java[1].
[1]
https://github.com/apache/calcite/blob/a68bfc96bacc95b4b8ab5d185bb5cc1991113769/linq4j/src/main/java/org/apache/calcite/linq4j/tree/Primitive.java#L44
----------------------------------------------------------------
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