slinkydeveloper commented on a change in pull request #17256: URL: https://github.com/apache/flink/pull/17256#discussion_r708891859
########## File path: flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/inference/TypeStrategies.java ########## @@ -105,6 +105,23 @@ public static TypeStrategy nullableIfArgs(TypeStrategy initialStrategy) { return nullableIfArgs(ConstantArgumentCount.any(), initialStrategy); } + /** + * A type strategy that can be used to make a result type nullable if all the selected input + * arguments is nullable. Otherwise the type will be not null. + */ + public static TypeStrategy nullableIfAllArgs( Review comment: Deriving nullability from the first arg will bring back problems like: ``` COALESCE(REGEXP_EXTRACT('22','[A-Z]+'),'-') ``` Returning a nullable data type, because `REGEXP_EXTRACT` is always nullable. Is that what you mean? -- 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