liuyongvs commented on code in PR #21993: URL: https://github.com/apache/flink/pull/21993#discussion_r1130306112
########## flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/inference/strategies/ArrayElementArgumentTypeStrategy.java: ########## @@ -42,9 +42,14 @@ public Optional<DataType> inferArgumentType( CallContext callContext, int argumentPos, boolean throwOnFailure) { final ArrayType haystackType = (ArrayType) callContext.getArgumentDataTypes().get(0).getLogicalType(); - final LogicalType haystackElementType = haystackType.getElementType(); final LogicalType needleType = callContext.getArgumentDataTypes().get(argumentPos).getLogicalType(); + LogicalType haystackElementType = haystackType.getElementType(); + + if (!haystackElementType.isNullable() && needleType.isNullable()) { + haystackElementType = haystackType.getElementType().copy(true); Review Comment: added -- 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