You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "simenliuxing (Jira)" <ji...@apache.org> on 2022/06/27 11:06:00 UTC

[jira] [Created] (FLINK-28262) The select result does not match the sink table

simenliuxing created FLINK-28262:
------------------------------------

             Summary: The select result does not match the sink table
                 Key: FLINK-28262
                 URL: https://issues.apache.org/jira/browse/FLINK-28262
             Project: Flink
          Issue Type: Improvement
          Components: Table SQL / Planner, Table SQL / Runtime
    Affects Versions: 1.14.0
            Reporter: simenliuxing


sql is as follows:
{code:java}
CREATE TABLE source
(
    int_one INT,
    int_two INT
) WITH (
      'connector' = 'datagen'
      ,'rows-per-second' = '1'
      ,'fields.int_one.min' = '1'
      ,'fields.int_one.max' = '1'
      ,'fields.int_two.min' = '2'
      ,'fields.int_two.max' = '2'
      );
CREATE TABLE sink
(
    int_one0 INT,
    int_two0 INT
) WITH (
      'connector' = 'print'
      );
insert into sink
select
       int_two as int_two0,  -- The result I want is to write to the int_two0 field of the sink table
       int_one as int_one0   -- The result I want is to write to the int_one0 field of the sink table
from source;
{code}
 

The result is as follows:
{code:java}
+I[2, 1]
+I[2, 1]
+I[2, 1]{code}
The problem seems to be here, I want query result and result table to be mapped by field name instead of location:
{code:java}
select
       int_two as int_two0, 
       int_one as int_one0 
from source;{code}

Will this issue be fixed in a later version?



--
This message was sent by Atlassian Jira
(v8.20.7#820007)