You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-zh@flink.apache.org by Benchao Li <li...@gmail.com> on 2020/04/21 10:30:48 UTC
Re: flink sql string char 不兼容?
写成varchar应该就可以了。
王双利 <al...@163.com> 于2020年4月21日周二 下午6:21写道:
> 下面的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应该怎么写合适呢?
>
--
Benchao Li
School of Electronics Engineering and Computer Science, Peking University
Tel:+86-15650713730
Email: libenchao@gmail.com; libenchao@pku.edu.cn