You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "jocean.shi (Jira)" <ji...@apache.org> on 2021/10/29 08:43:00 UTC
[jira] [Commented] (FLINK-24632) "where ... in(..)" has wrong
result
[ https://issues.apache.org/jira/browse/FLINK-24632?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17435852#comment-17435852 ]
jocean.shi commented on FLINK-24632:
------------------------------------
I am puzzled about the meaning of this sql
> "where ... in(..)" has wrong result
> -----------------------------------
>
> Key: FLINK-24632
> URL: https://issues.apache.org/jira/browse/FLINK-24632
> Project: Flink
> Issue Type: Bug
> Reporter: xuyang
> Priority: Minor
>
> The sql is :
>
> {code:java}
> // code placeholder
> CREATE TABLE a(
> a1 INT , a2 INT
> ) WITH (
> 'connector' = 'filesystem',
> 'path' = '/Users/tmp/test/testa.csv',
> 'format' = 'csv',
> 'csv.field-delimiter'=';')
> CREATE TABLE b(
> b1 INT , b2 INT
> ) WITH (
> 'connector' = 'filesystem',
> 'path' = '/Users/tmp/test/testb.csv',
> 'format' = 'csv',
> 'csv.field-delimiter'=';')
> select * from a where a.a1 in (select a1 from b where a.a1 = b.b2)
> {code}
> and the data is
> {code:java}
> // testa.csv
> 1;1
> 1;2
> 4;6
> 77;88
> // testb.csv
> 2;1
> 2;2
> 3;4{code}
> The result in PostgreSQL is :
> {code:java}
> // code placeholder
> 1 1
> 1 2
> 4 6{code}
> But in Flink, the result is :
> {code:java}
> // code placeholder
> 1 2
> 1 1
> 4 6
> 77 88{code}
> I think something goes wrong.
>
>
>
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)