版本: 1.10.1
引擎:flink
先创建的table表schema如下:
-- root
 |-- address: STRING
 |-- tum: TIMESTAMP(3)
 |-- tum_count: BIGINT

table2表schema如下:
root
 |-- name: STRING
 |-- age: STRING
 |-- field_time: TIMESTAMP(3)
 |-- address: STRING
 |-- proctimeField: TIMESTAMP(3)
其中proctimeField是PROCTIME

然后执行sql如下:
"insert into `table`\n" +
                        "select\n" +
                        "     address,\n" +
                        "     tumble_start(proctimeField, INTERVAL '10' SECOND) 
as tum,\n" +
                        "     count(1) as tum_count \n" +
                        "from `table2\n" +
                        "group by \n" +
                        " tumble(proctimeField, INTERVAL '10' SECOND), address;

出现如下异常:
org.apache.flink.table.api.ValidationException: Field types of query result
and registered TableSink `table` do not match.
Query result schema: [address: String, tum: TimeIndicatorTypeInfo(proctime),
tum_count: Long]
TableSink schema:    [address: String, tum: LocalDateTime, tum_count: Long]

求大佬指点迷津





--
Sent from: http://apache-flink.147419.n8.nabble.com/

回复