danny0405 commented on a change in pull request #1406: [CALCITE-3243] 
Incomplete validation of operands in JSON functions
URL: https://github.com/apache/calcite/pull/1406#discussion_r317577000
 
 

 ##########
 File path: 
core/src/main/java/org/apache/calcite/sql/fun/SqlJsonExistsFunction.java
 ##########
 @@ -34,14 +34,15 @@ public SqlJsonExistsFunction() {
     super("JSON_EXISTS", SqlKind.OTHER_FUNCTION,
         ReturnTypes.cascade(ReturnTypes.BOOLEAN, 
SqlTypeTransforms.FORCE_NULLABLE), null,
         OperandTypes.or(
-            OperandTypes.family(SqlTypeFamily.ANY, SqlTypeFamily.CHARACTER),
 
 Review comment:
   I think the main reason these JSON functions define the first operand as sql 
type family `ANY` is that the first operand usually is with struct(or JSON 
type), calcite doesn't support JSON type yet, use ANY will translate the 
operand as a Java `Object`.

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

Reply via email to