You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Ingo Bürk (Jira)" <ji...@apache.org> on 2021/04/13 12:03:00 UTC
[jira] [Created] (FLINK-22260) Source schema in CREATE TABLE LIKE
statements is not inferred correctly
Ingo Bürk created FLINK-22260:
---------------------------------
Summary: Source schema in CREATE TABLE LIKE statements is not inferred correctly
Key: FLINK-22260
URL: https://issues.apache.org/jira/browse/FLINK-22260
Project: Flink
Issue Type: Bug
Components: Table SQL / API
Affects Versions: 1.13.0
Reporter: Ingo Bürk
When using a LIKE statement such as in the following (assume some_sink and some_source to be two tables with the same schema)
{code:java}
CREATE TEMPORARY TABLE b LIKE some_sink
INSERT INTO b SELECT * FROM some_source{code}
the source schema for the INSERT operation is not actually inferred correctly, causing the entire query to fail:
{quote}org.apache.flink.table.api.ValidationException: Column types of query result and sink for registered table 'default.default.b' do not match.
Cause: Different number of columns.
Query schema: [name: STRING, ts: TIMESTAMP(3) *ROWTIME*]
Sink schema: []
{quote}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)