gustavodemorais commented on code in PR #26022:
URL: https://github.com/apache/flink/pull/26022#discussion_r1928817518
##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/functions/BuiltInFunctionDefinitions.java:
##########
@@ -2819,6 +2819,15 @@ ANY, and(logical(LogicalTypeRoot.BOOLEAN), LITERAL)
.runtimeDeferred()
.build();
+ public static final BuiltInFunctionDefinition JSON =
+ BuiltInFunctionDefinition.newBuilder()
+ .name("JSON")
+ .kind(SCALAR)
+
.inputTypeStrategy(sequence(logical(LogicalTypeFamily.CHARACTER_STRING)))
+
.outputTypeStrategy(nullableIfArgs(explicit(DataTypes.STRING())))
+
.runtimeClass("org.apache.flink.table.runtime.functions.scalar.JsonFunction")
Review Comment:
My first take at it gave me the impression that we would have even more
boilerplate code if we go with runtimeDeferred - I can't just swap them. Would
it be a bad practice using the runtime class here?
--
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]