Exception in thread “main” org.apache.flink.table.api.ValidationException: Type TIMESTAMP(3) of table field ‘usertime’ does not match with the physical type TIMESTAMP(6) of the ‘usertime’ field of the TableSource return type.
这是由于flink与数据库的timestamp字段长度不匹配造成。flink的timestamp字段宽度时3,数据库字段宽度一般是6。解决方法很简单,将定义time字段时,指定timestamp的字段长度。
usertime timestamp(3)