xiemeilong created FLINK-16269: ---------------------------------- Summary: Generic type can not be matched when convert table to stream. Key: FLINK-16269 URL: https://issues.apache.org/jira/browse/FLINK-16269 Project: Flink Issue Type: Bug Components: API / Type Serialization System Affects Versions: 1.10.0 Reporter: xiemeilong
The query result schema printed by table.printSchema(): {noformat} |-- deviceId: BIGINT |-- channel: STRING |-- schemaId: BIGINT |-- productId: BIGINT |-- schema: LEGACY('RAW', 'ANY<com.yunmo.iot.schema.Schema>') {noformat} then excuting table.toRetractStream[DeviceSchema].print(), exception throwed: {noformat} Exception in thread "main" org.apache.flink.table.api.ValidationException: Field types of query result and registered TableSink do not match. Query schema: [deviceId: BIGINT, channel: STRING, schemaId: BIGINT, productId: BIGINT, schema: RAW('com.yunmo.iot.schema.Schema', ?)] Sink schema: [deviceId: BIGINT, channel: STRING, schemaId: BIGINT, productId: BIGINT, schema: LEGACY('RAW', 'ANY<com.yunmo.iot.schema.Schema>')]{noformat} The com.yunmo.iot.schema.Schema is a generic type. The schema field of Query schema change from LEGACY('RAW' to RAW, but the Sink schema still a LEGACY('RAW' -- This message was sent by Atlassian Jira (v8.3.4#803005)