twalthr commented on code in PR #29335:
URL: https://github.com/apache/flink/pull/29335#discussion_r4165834524
##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/inference/SystemTypeInference.java:
##########
@@ -348,6 +348,12 @@ public Optional<DataType> inferType(CallContext
callContext) {
fields.addAll(deriveRowtimeField(callContext, resolvedArgs));
}
+ // Nothing to show at all: no pass-through, no
rowtime, and the
+ // function itself returned ROW<>. Fall back
to EXPR$0 as output.
+ if (fields.isEmpty()) {
+ fields.add(DataTypes.FIELD("EXPR$0",
functionDataType));
Review Comment:
Wouldn't it be better to throw an error in this case? A function with no
output sounds like a mistake. By emitting EXPR$0 we introduce a mismatch
between data type and data value on the wire, no?
--
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]