twalthr commented on code in PR #29566:
URL: https://github.com/apache/flink/pull/29566#discussion_r4359737886
##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/inference/TypeInferenceUtil.java:
##########
@@ -583,24 +582,32 @@ private static CastCallContext inferInputTypes(
return castCallContext;
}
- private static StateInfo inferStateInfo(
+ private static Optional<StateInfo> inferStateInfo(
CallContext callContext, String name, StateTypeStrategy
stateTypeStrategy) {
final DataType stateType =
stateTypeStrategy.inferType(callContext).orElse(null);
- if (stateType == null || isUnknown(stateType)) {
- final String errorMessage;
+ if (stateType == null) {
+ if (callContext.getFunctionDefinition().getKind() ==
FunctionKind.PROCESS_TABLE) {
Review Comment:
AI generated test for all these case. But in reality they cannot happen,
only if you are an expert and override default behavior. It just blows up tests
if we start testing things that are far away from how people use our system.
--
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]