[ https://issues.apache.org/jira/browse/FLINK-28830?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
lincoln lee updated FLINK-28830: -------------------------------- Fix Version/s: 1.20.0 > new stack udtf doesn't support atomic type > ------------------------------------------- > > Key: FLINK-28830 > URL: https://issues.apache.org/jira/browse/FLINK-28830 > Project: Flink > Issue Type: Bug > Components: Table SQL / Planner > Affects Versions: 1.16.0 > Reporter: Jacky Lau > Priority: Major > Fix For: 1.19.0, 1.20.0 > > > {code:java} > // code placeholder > public class GenerateSeriesFunction extends BuiltInTableFunction<Long> { > private static final long serialVersionUID = 1L; > public GenerateSeriesFunction(SpecializedContext specializedContext) { > super(BuiltInFunctionDefinitions.GENERATE_SERIES, specializedContext); > } > public void eval(long start, long stop) { > eval(start, stop, 1); > } > > public void eval(long start, long stop, long step) { > long s = start; > while (s <= stop) { > collect(s); > s += step; > } > } > } > public static final BuiltInFunctionDefinition GENERATE_SERIES = > BuiltInFunctionDefinition.newBuilder() > .name("GENERATE_SERIES") > .kind(TABLE) > .inputTypeStrategy( > or( > sequence( > logical(LogicalTypeFamily.NUMERIC), > logical(LogicalTypeFamily.NUMERIC)), > sequence( > logical(LogicalTypeFamily.NUMERIC), > logical(LogicalTypeFamily.NUMERIC), > logical(LogicalTypeFamily.NUMERIC)))) > .outputTypeStrategy(explicit(DataTypes.BIGINT())) > .runtimeClass( > > "org.apache.flink.table.runtime.functions.table.GenerateSeriesFunction") > .build(); {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)