lincoln-lil commented on code in PR #24773: URL: https://github.com/apache/flink/pull/24773#discussion_r1674142139
########## flink-table/flink-table-common/src/main/java/org/apache/flink/table/functions/BuiltInFunctionDefinitions.java: ########## @@ -431,6 +431,26 @@ ANY, and(logical(LogicalTypeRoot.BOOLEAN), LITERAL) .runtimeClass("org.apache.flink.table.runtime.functions.scalar.SplitFunction") .build(); + public static final BuiltInFunctionDefinition URL_DECODE = + BuiltInFunctionDefinition.newBuilder() + .name("url_decode") + .kind(SCALAR) + .inputTypeStrategy(sequence(logical(LogicalTypeFamily.CHARACTER_STRING))) + .outputTypeStrategy(nullableIfArgs(explicit(DataTypes.STRING()))) Review Comment: @snuyanzin Sorry I missed the ping here! IIUC the `AbstractDataType`#`nullable` says it's the default behavior means a datatype which doesn't explictly declares its nullabilty then the default behavior is nullable. For the output type strategy, I think I should point it out more clearly: it should be 'outputTypeStrategy(explicit(DataTypes.STRING().nullable()))' because the return value may be null even if the input is non-null (e.g., decoding failure), WDYT? -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org