amoro
amoro copied to clipboard
[Flink] Support create and get timestamp(3) timestamp(0) type in the arctic table
Scenario: Create an iceberg table that has a timestamp-type column with a precision equal to 0 by Flink SQL.
Using the below DDL to create a watermark definition table like the iceberg table would be failed.
create table hadoop_catalog.db.dim (id int, name string, opt timestamp(0), primary key (id) not enforced) ;
create table arctic_dim ( watermark for opt as opt - interval '5' second) like hadoop_catalog.db.dim;
org.apache.flink.table.api.ValidationException: Invalid data type of time field for watermark definition. The field must be of type TIMESTAMP(p) or TIMESTAMP_LTZ(p), the supported precision 'p' is from 0 to 3, but the time field type is TIMESTAMP(6)
The TypeToFlinkType default converts it to flink timestamp type with precision 6.
@YesOrNo828, users could case the TIMESTAMP(p)/TIMESTAMP_LTZ(p) to TIMESTAMP(3)/TIMESTAMP_LTZ(3), which has already been verified whether the watermark definition works well. Therefore, this issue could be closed and the watermark definition could provide an example in the document.
@YesOrNo828, users could case the
TIMESTAMP(p)/TIMESTAMP_LTZ(p)toTIMESTAMP(3)/TIMESTAMP_LTZ(3), which has already been verified whether the watermark definition works well. Therefore, this issue could be closed and the watermark definition could provide an example in the document.
@SteNicholas Thanks for your verification and I will close this issue.