Hi all, I'm migrating working code from Flink 1.1...
# troubleshooting
s
Hi all, I'm migrating working code from Flink 1.13 to 1.16 but running into issues with temporal tables. I have a table created from a simple stream with schema:
Copy code
(
  `offset` BIGINT NOT NULL,
  `system_time` TIMESTAMP(3) NOT NULL,
  `event_time` TIMESTAMP(3) NOT NULL *ROWTIME*,
  `symbol` STRING NOT NULL,
  `price` INT NOT NULL,
)
when I call
table.createTemporalTableFunction($"event_time", $"symbol")
I get a following error:
TableException: Unsupported conversion from data type 'TIMESTAMP(3) NOT NULL' (conversion class: org.apache.flink.table.data.TimestampData) to type information. Only data types that originated from type information fully support a reverse conversion.
Is anyone familiar with migration to the new type system? I'm at a loss.
stack trace:
Copy code
org.apache.flink.table.api.TableException: Unsupported conversion from data type 'TIMESTAMP(3) NOT NULL' (conversion class: org.apache.flink.table.data.TimestampData) to type information. Only data types that originated from type information fully support a reverse conversion.
	at org.apache.flink.table.types.utils.LegacyTypeInfoDataTypeConverter.toLegacyTypeInfo(LegacyTypeInfoDataTypeConverter.java:273)
	at org.apache.flink.table.types.utils.TypeConversions.fromDataTypeToLegacyInfo(TypeConversions.java:71)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:546)
	at java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260)
	at java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:505)
	at org.apache.flink.table.types.utils.TypeConversions.fromDataTypeToLegacyInfo(TypeConversions.java:84)
	at org.apache.flink.table.api.TableSchema.getFieldTypes(TableSchema.java:126)
	at org.apache.flink.table.functions.TemporalTableFunctionImpl.create(TemporalTableFunctionImpl.java:108)
	at org.apache.flink.table.api.internal.TableImpl.createTemporalTableFunction(TableImpl.java:154)
m
I’m assuming this is a Table API application?
s
streaming + table all my data is read as a DataStream continuously from a bunch of parquet files and all processing is done via SQL
m
I’m on mobile but I recall in the release notes (I think for 1.14) on what has changed on this. Have you checked those (and of the other versions)?
s
will have another look, thank you
I just verified that filtering out the
system_time
column (the other TIMESTAMP that is not ROWTIME) fixes the issue
👍 1