[
https://issues.apache.org/jira/browse/FLINK-32579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17742834#comment-17742834
]
jasonliangyc edited comment on FLINK-32579 at 7/13/23 3:09 PM:
---------------------------------------------------------------
Hi [[email protected]]. Yes, I'm using the 1.17.0, but i also tried the 1.17.1,
same issues.
I can reproduce the problems by using the attached [^test_case.sql], could you
try it again by following the setups in that file? thanks.
!image-2023-07-13-22-35-35-696.png|width=674,height=164!
For the second problem, it means:
if
{code:java}
where p.name = '??????' {code}
then the value of column 'name' return '??????'
if
{code:java}
where p.name = '+++++' {code}
then the value of column 'name' return '+++++'
but actually there are no such data in the 'products' table, it is weird that
it always return the same value as the one in the <where clause>.
{code:java}
select
cdc.order_id,
cdc.order_date,
cdc.customer_name,
cdc.price,
p.name
FROM orders AS cdc
left JOIN products
FOR SYSTEM_TIME AS OF cdc.proc_time as p ON cdc.product_id = p.id
where p.name = '??????'{code}
!image-2023-07-13-22-38-16-709.png|width=663,height=120!
!image-2023-07-13-22-43-45-957.png|width=662,height=141!
was (Author: JIRAUSER301313):
Hi [[email protected]]. Yes, I'm using the 1.17.0, but i also tried the 1.17.1,
same issues.
I can reproduce the problems by using the attached [^test_case.sql], could you
try it again by following the setups in that file? thanks.
!image-2023-07-13-22-35-35-696.png|width=674,height=164!
For the second problem, it means:
if *where p.name = '??????'* ,then the value of column 'name' return '??????'
if {*}where p.name = '+++++'{*}, then the value of column 'name' return '+++++'
but actually there are no such data in the 'products' table, it is weird that
it always return the same value as the one in the <where clause>.
{code:java}
select
cdc.order_id,
cdc.order_date,
cdc.customer_name,
cdc.price,
p.name
FROM orders AS cdc
left JOIN products
FOR SYSTEM_TIME AS OF cdc.proc_time as p ON cdc.product_id = p.id
where p.name = '??????'{code}
!image-2023-07-13-22-38-16-709.png|width=663,height=120!
!image-2023-07-13-22-43-45-957.png|width=662,height=141!
> The filter criteria on the lookup table of Lookup join has no effect
> ---------------------------------------------------------------------
>
> Key: FLINK-32579
> URL: https://issues.apache.org/jira/browse/FLINK-32579
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / Client
> Affects Versions: 1.17.0, 1.17.1
> Reporter: jasonliangyc
> Priority: Major
> Attachments: image-2023-07-12-09-31-18-261.png,
> image-2023-07-12-09-42-59-231.png, image-2023-07-12-09-47-31-397.png,
> image-2023-07-13-17-19-26-972.png, image-2023-07-13-22-35-35-696.png,
> image-2023-07-13-22-38-16-709.png, image-2023-07-13-22-43-24-213.png,
> image-2023-07-13-22-43-45-957.png, test_case.sql
>
>
> *1.* I joined two tables using the lookup join as below query in sql-client,
> the filter criteria of (p.name = '??????') didn't shows up in the execution
> detail and it returned the rows only base on one condiction (cdc.product_id =
> p.id)
> {code:java}
> select
> cdc.order_id,
> cdc.order_date,
> cdc.customer_name,
> cdc.price,
> p.name
> FROM orders AS cdc
> left JOIN products
> FOR SYSTEM_TIME AS OF cdc.proc_time as p ON p.name = '??????' and
> cdc.product_id = p.id
> ; {code}
> !image-2023-07-12-09-31-18-261.png|width=657,height=132!
>
> *2.* It showed the werid results when i changed the query as below, cause
> there were no data in the table(products) that the value of column 'name' is
> '??????' and and execution detail didn't show us the where criteria.
> {code:java}
> select
> cdc.order_id,
> cdc.order_date,
> cdc.customer_name,
> cdc.price,
> p.name
> FROM orders AS cdc
> left JOIN products
> FOR SYSTEM_TIME AS OF cdc.proc_time as p ON cdc.product_id = p.id
> where p.name = '??????'
> ; {code}
> !image-2023-07-12-09-42-59-231.png|width=684,height=102!
> !image-2023-07-12-09-47-31-397.png|width=685,height=120!
>
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)