Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.10.0
Description
The query result schema printed by table.printSchema():
|-- deviceId: BIGINT |-- channel: STRING |-- schemaId: BIGINT |-- productId: BIGINT |-- schema: LEGACY('RAW', 'ANY<com.yunmo.iot.schema.Schema>')
then excuting table.toRetractStream[DeviceSchema].print(), exception throwed:
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>')]
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'
Attachments
Issue Links
- links to