davidradl commented on code in PR #27369:
URL: https://github.com/apache/flink/pull/27369#discussion_r2649175901
##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/inference/strategies/FamilyArgumentTypeStrategy.java:
##########
@@ -86,13 +86,16 @@ public Optional<DataType> inferArgumentType(
if (Objects.equals(expectedNullability, Boolean.FALSE) &&
actualType.isNullable()) {
return callContext.fail(
throwOnFailure,
- "Unsupported argument type. Expected nullable type of
family '%s' but actual type was '%s'.",
+ "Unsupported argument type. Expected NOT NULL type of
family '%s' but actual type was '%s'.",
expectedFamily,
actualType);
}
// type is part of the family
if (actualType.getTypeRoot().getFamilies().contains(expectedFamily)) {
+ if (Objects.equals(expectedNullability, Boolean.TRUE) &&
!actualType.isNullable()) {
Review Comment:
I think it would be useful for the issue text / PR text to give SQL examples
of the reported issue and the expected behaviour - currently descriptions are
very low level and require table planner knowledge. This would help users find
and identify this issue at the SQL level
--
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]