XuQianJin-Stars commented on a change in pull request #11186:
[FLINK-16200][sql] Support JSON_EXISTS for blink planner
URL: https://github.com/apache/flink/pull/11186#discussion_r398265336
##########
File path:
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/codegen/calls/FunctionGenerator.scala
##########
@@ -801,6 +801,20 @@ object FunctionGenerator {
new MethodCallGen(
BuiltInMethod.IS_JSON_SCALAR.method)))
+ addSqlFunctionMethod(
+ JSON_EXISTS,
+ Seq(CHAR, CHAR),
Review comment:
> What about `Seq(VARCHAR, CHAR)`/`Seq(CHAR, VARCHAR)`?
```
public SqlJsonExistsFunction() {
super("JSON_EXISTS", SqlKind.OTHER_FUNCTION,
ReturnTypes.cascade(ReturnTypes.BOOLEAN,
SqlTypeTransforms.FORCE_NULLABLE), null,
OperandTypes.or(
OperandTypes.family(SqlTypeFamily.ANY, SqlTypeFamily.CHARACTER),
OperandTypes.family(SqlTypeFamily.ANY, SqlTypeFamily.CHARACTER,
SqlTypeFamily.ANY)),
SqlFunctionCategory.SYSTEM);
}
```
The `path` parameter can only be CHAR. This need to add `Seq(VARCHAR, CHAR)`
----------------------------------------------------------------
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