建议将完整的代码展示出来,现在的信息不足以分析问题。
On Fri, 11 Dec 2020 at 11:53, jun su <[email protected]> wrote: > hi Danny, > 尝试过是一样报错,debug看了下是LogicalWindowAggregateRuleBase在构建window时没有将Expr信息带下去 > , 只带了别名,导致后续优化规则报错退出 > > Danny Chan <[email protected]> 于2020年12月11日周五 上午11:47写道: > > > 有木有尝试补充 watermark 语法 > > > > jun su <[email protected]> 于2020年12月11日周五 上午10:47写道: > > > > > hi all, > > > > > > flink 1.11.0版本, 使用computed column将long类型字段转为timestamp后进行时间窗口聚合,报如下错误: > > > > > > ddl: > > > > > > CREATE TABLE source( > > > occur_time BIGINT, > > > rowtime AS longToTimestamp(occur_time) > > > ) WITH ('connector' = 'filesystem','format' = 'orc','path' = > > > '/path/to/data') > > > > > > 报错信息: > > > > > > Caused by: java.lang.IllegalArgumentException: field [$f0] not found; > > input > > > fields are: [occur_time] > > > at org.apache.calcite.tools.RelBuilder.field(RelBuilder.java:402) > > > at org.apache.calcite.tools.RelBuilder.field(RelBuilder.java:385) > > > at > > > > > > > > > org.apache.flink.table.planner.plan.utils.AggregateUtil$.timeFieldIndex(AggregateUtil.scala:720) > > > at > > > > > > > > > org.apache.flink.table.planner.plan.rules.physical.batch.BatchExecWindowAggregateRule.transformTimeSlidingWindow(BatchExecWindowAggregateRule.scala:161) > > > at > > > > > > > > > org.apache.flink.table.planner.plan.rules.physical.batch.BatchExecWindowAggregateRule.onMatch(BatchExecWindowAggregateRule.scala:111) > > > at > > > > > > > > > org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:217) > > > ... 27 more > > > > > > -- > > > Best, > > > Jun Su > > > > > > > > -- > Best, > Jun Su >
