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

Sergey Nuyanzin updated FLINK-39278:
------------------------------------
    Description: 
example
{code:sql}
CREATE MATERIALIZED TABLE users_shops (shop_id STRING, user_id STRING)"
 FRESHNESS = INTERVAL '30' SECOND
  AS SELECT 1 AS shop_id, 2 AS user_id
{code}

it fails with
{noformat}
Incompatible types for sink column 'shop_id' at position 0. The source column 
has type 'INT NOT NULL', 
while the target column has type 'STRING'.
{noformat}

while should fail as
{noformat}
Incompatible types for sink column 'shop_id' at position 1. The source column 
has type 'INT NOT NULL', 
while the target column has type 'STRING'.
{noformat}

  was:The issues is to fix error message 


> Indexing of columns in CREATE [MATERIALIZED ]TABLE should start with 1 in 
> error messages
> ----------------------------------------------------------------------------------------
>
>                 Key: FLINK-39278
>                 URL: https://issues.apache.org/jira/browse/FLINK-39278
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Planner
>            Reporter: Sergey Nuyanzin
>            Assignee: Sergey Nuyanzin
>            Priority: Major
>              Labels: pull-request-available
>
> example
> {code:sql}
> CREATE MATERIALIZED TABLE users_shops (shop_id STRING, user_id STRING)"
>  FRESHNESS = INTERVAL '30' SECOND
>   AS SELECT 1 AS shop_id, 2 AS user_id
> {code}
> it fails with
> {noformat}
> Incompatible types for sink column 'shop_id' at position 0. The source column 
> has type 'INT NOT NULL', 
> while the target column has type 'STRING'.
> {noformat}
> while should fail as
> {noformat}
> Incompatible types for sink column 'shop_id' at position 1. The source column 
> has type 'INT NOT NULL', 
> while the target column has type 'STRING'.
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to