You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Jark Wu (Jira)" <ji...@apache.org> on 2020/02/25 04:10:00 UTC

[jira] [Updated] (FLINK-16269) Generic type can not be matched when convert table to stream.

     [ https://issues.apache.org/jira/browse/FLINK-16269?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jark Wu updated FLINK-16269:
----------------------------
    Component/s:     (was: API / Type Serialization System)
                 Table SQL / API

> 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: Table SQL / API
>    Affects Versions: 1.10.0
>            Reporter: xiemeilong
>            Priority: Major
>
> 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)