You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Timo Walther (Jira)" <ji...@apache.org> on 2025/04/10 13:40:00 UTC
[jira] [Created] (FLINK-37651) Simplify StaticArgument builders for easier type inference
Timo Walther created FLINK-37651:
------------------------------------
Summary: Simplify StaticArgument builders for easier type inference
Key: FLINK-37651
URL: https://issues.apache.org/jira/browse/FLINK-37651
Project: Flink
Issue Type: Sub-task
Components: Table SQL / API
Reporter: Timo Walther
Assignee: Timo Walther
Implementing type strategies in PTFs needs to become easier.
Currently this code is needed if input == output:
{code}
@Override
public TypeInference getTypeInference(DataTypeFactory typeFactory) {
return TypeInference.newBuilder()
.staticArguments(
StaticArgument.table(
"input",
Row.class,
false,
EnumSet.of(StaticArgumentTrait.TABLE_AS_SET)))
.outputTypeStrategy(
callContext -> Optional.of(callContext.getArgumentDataTypes().get(0)))
.build();
}
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)