jasonliangyc created FLINK-32579:
------------------------------------

             Summary: 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.1, 1.17.0
            Reporter: jasonliangyc
         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

*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