Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-32579

The filter criteria on the lookup table of Lookup join has no effect

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.17.0, 1.17.1
    • None
    • Table SQL / Client
    • None

    Description

      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)

      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
      ; 

       

      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.

      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 = '??????'
      ; 

       

       

       

      Attachments

        1. image-2023-07-12-09-31-18-261.png
          39 kB
          jasonliangyc
        2. image-2023-07-12-09-42-59-231.png
          18 kB
          jasonliangyc
        3. image-2023-07-12-09-47-31-397.png
          41 kB
          jasonliangyc
        4. image-2023-07-13-17-19-26-972.png
          337 kB
          Yunhong Zheng
        5. image-2023-07-13-22-35-35-696.png
          46 kB
          jasonliangyc
        6. image-2023-07-13-22-38-16-709.png
          30 kB
          jasonliangyc
        7. image-2023-07-13-22-43-24-213.png
          29 kB
          jasonliangyc
        8. image-2023-07-13-22-43-45-957.png
          29 kB
          jasonliangyc
        9. image-2023-07-14-23-12-51-696.png
          41 kB
          jasonliangyc
        10. image-2023-07-14-23-20-18-936.png
          58 kB
          jasonliangyc
        11. test_case.sql
          3 kB
          jasonliangyc

        Activity

          People

            Unassigned Unassigned
            jasonliangyc jasonliangyc
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: