twalthr commented on a change in pull request #16776:
URL: https://github.com/apache/flink/pull/16776#discussion_r689296295
##########
File path:
flink-table/flink-table-common/src/main/java/org/apache/flink/table/functions/BuiltInFunctionDefinitions.java
##########
@@ -1504,6 +1506,23 @@
.runtimeDeferred()
.build();
+ public static final BuiltInFunctionDefinition JSON_VALUE =
+ BuiltInFunctionDefinition.newBuilder()
+ .name("JSON_VALUE")
+ .kind(SCALAR)
+ .inputTypeStrategy(
+ sequence(
+
logical(LogicalTypeFamily.CHARACTER_STRING),
+
and(logical(LogicalTypeFamily.CHARACTER_STRING), LITERAL),
+ TYPE_LITERAL,
+ symbol(JsonValueOnEmptyOrError.class),
+ ANY,
+ symbol(JsonValueOnEmptyOrError.class),
+ ANY))
+ .outputTypeStrategy(argument(2))
Review comment:
this would lead to NOT NULL if a user passes
`DataTypes.INT().notNull()`, not sure if we want that. how about we rename
`nullable()` to `nullableIfArgs`? and use `nullable(argument(2))` to make it
always nullable.
--
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]