[
https://issues.apache.org/jira/browse/FLINK-28262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
simenliuxing updated FLINK-28262:
---------------------------------
Description:
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}
expected outcome:
{code:java}
+I[1, 2]
+I[1, 2]
+I[1, 2]{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?
was:
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?
> 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
> Priority: Major
>
> 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}
> expected outcome:
> {code:java}
> +I[1, 2]
> +I[1, 2]
> +I[1, 2]{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)