Hi Sink 对应的字段(taskid\hit)需要声明成varchar, 现在不支持varchar类型写入char(n)
祝好, Leonard Xu > 在 2020年4月21日,18:20,王双利 <[email protected]> 写道: > > 下面的sql 执行的时候报 下面的错误CREATE TABLE target ( > jnlno VARCHAR, > -- taskid char(9), > -- hit char(4) > taskid VARCHAR, > hit VARCHAR > ) > insert into target select a.jnlno,'111111qeq','false' from loginevent a > > Exception in thread "main" org.apache.flink.table.api.ValidationException: > Type STRING of table field 'hit' does not match with the physical type > CHAR(4) of the 'EXPR$2' field of the TableSink consumed type. > > Flink 版本 1.10 > 怎么解决呢?Flink sql的 string char 不兼容? > sql应该怎么写合适呢?
