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/05/14 03:53:00 UTC
[jira] [Comment Edited] (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:comment-tabpanel&focusedCommentId=17106855#comment-17106855 ]
Jark Wu edited comment on FLINK-16269 at 5/14/20, 3:52 AM:
-----------------------------------------------------------
[~xiemeilong] Could you create another issue for this and provide the code which can reproduce the exception?
was (Author: jark):
Could you create another issue for this and provide the code which can reproduce the exception?
> 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
> Assignee: Jark Wu
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.10.1, 1.11.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> 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)