[ 
https://issues.apache.org/jira/browse/FLINK-32579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17742728#comment-17742728
 ] 

Yunhong Zheng commented on FLINK-32579:
---------------------------------------

Hi [~jasonliangyc] . Are you using Flink version 1.17.0?  I am unable to 
reproduce the problem in Figure 1 as you shown in my local UT case.  My sql 
pattern is:
{code:java}
SELECT * FROM MyTable AS T LEFT JOIN LookupTable FOR SYSTEM_TIME AS OF 
T.proctime AS D ON T.b = '?????' and T.a = D.id {code}
My rel plan result is:

!image-2023-07-13-17-19-26-972.png|width=708,height=49!

 

BTW, I don't quite understand what is the problem in your Figure 2? Can you 
clarify it. Thanks!

> 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
>
>
> *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)

Reply via email to