zhztheplayer commented on a change in pull request #1149: [CALCITE-2982]
SqlItemOperator should throw understandable exception …
URL: https://github.com/apache/calcite/pull/1149#discussion_r278589957
##########
File path: core/src/main/java/org/apache/calcite/sql/fun/SqlItemOperator.java
##########
@@ -89,6 +88,9 @@
}
final RelDataType operandType = callBinding.getOperandType(0);
final SqlSingleOperandTypeChecker checker = getChecker(operandType);
+ if (checker == null) {
+ throw callBinding.newValidationSignatureError();
Review comment:
Thank you very much for the change, @pengzhiwei2018!
But why using a null check rather than changing the default case in switch
block? Seems they are effectively equivalent. Sorry to be a little picky ;)
----------------------------------------------------------------
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