[
https://issues.apache.org/jira/browse/FLINK-32579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17743197#comment-17743197
]
jasonliangyc commented on FLINK-32579:
--------------------------------------
Thanks [[email protected]].
For 1:
Now it can show the filter condition in the execution plan detail after set
'table.optimizer.source.predicate-pushdown-enabled' = 'false' to disable the
filter push down.
!image-2023-07-14-23-12-51-696.png|width=577,height=118!
For 2:
Your speculation is right, by default the pushdow is enabled, but the jdbc
source doesn't process this filter condition correctly and then return the
wrong results.
After disabled the pushdown, we can get the normal return.
Hi @ [~ruanhang1993], could you help take a look at this? thanks.
!image-2023-07-14-23-20-18-936.png|width=569,height=263!
> 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, image-2023-07-14-23-12-51-696.png,
> image-2023-07-14-23-20-18-936.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)