Hi! The precision of time attribute can only be 3, you can try casting the proctime column to TIMESTAMP(3) and that should work.
Pranav Patil <pranav.pa...@salesforce.com> 于2021年8月3日周二 上午8:51写道: > Hi, > > I'm upgrading a repository from Flink 1.11 to Flink 1.13. I have Flink SQL > command that used to do tumbling windows using the following in the GROUP > BY clause: > > SELECT ... FROM ... GROUP BY TUMBLE(proctime, INTERVAL '1' MINUTE) > > However now, it gives me the error: > > org.apache.flink.table.api.TableException: Window aggregate can only be > defined over a time attribute column, but TIMESTAMP(9) encountered. > > I'm not sure why this isn't a time attribute column anymore. Thinking it's a > syntax change, I try: > > Table(TUMBLE(Table inputStream,DESCRIPTOR(proctime),INTERVAL '1' MINUTE)) > > This too doesn't work, with the error: > > org.apache.flink.table.api.ValidationException: The window function > TUMBLE(TABLE table_name, DESCRIPTOR(timecol), datetime interval) requires the > timecol is a time attribute type, but is TIMESTAMP(9). > > So I'm realizing the problem is actually that it isn't a time attribute > column. However, I'm confused because this wasn't a problem in previous > versions. In the DataStream API file source, assignTimestampsAndWatermarks is > called on the source stream, which I believed to be enough. I then call > registerDatastream to access it from Flink SQL. Are there additional steps > that must be taken in Flink 1.13? > > Thank you. > >