herunkang2018 commented on code in PR #3489:
URL: https://github.com/apache/calcite/pull/3489#discussion_r1376391896
##########
core/src/main/java/org/apache/calcite/adapter/enumerable/RexImpTable.java:
##########
@@ -664,6 +665,7 @@ Builder populate() {
defineMethod(SINH, BuiltInMethod.SINH.method, NullPolicy.STRICT);
defineMethod(TAN, BuiltInMethod.TAN.method, NullPolicy.STRICT);
defineMethod(TANH, BuiltInMethod.TANH.method, NullPolicy.STRICT);
+ defineMethod(HYPOT, BuiltInMethod.HYPOT.method, NullPolicy.ANY);
Review Comment:
In the doc, ANY means 'If any of the arguments are null, return null', and
ALL means 'returns null only if all arguments are null'.
NullPolicy's class comment says STRICT and ANY are similar. And I checked
that in codegen phase, STRICT and ANY is the same when generates the null
condition, see more at `AbstractRexCallImplementor.getCondition`.
BTW I find that NullPolicy.STRICT's comment is not very clear, it says
'Returns null if and only if one of the arguments are null', which makes me
confused that more arguments are null will do not return null.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]