antonkw commented on PR #4177:
URL: https://github.com/apache/calcite/pull/4177#issuecomment-2648819144

   @suibianwanwank 
   ```
   \"product_id\" = \"product\".\"product_class_id\"
   ```
   here we go again :) 
   
   Added `IN` match and test has repaired.
   
   ```java
     @Test void testFilterWithSubQuery() {
       final String sql = "SELECT * FROM "
           + "(select * from ("
           + "select e1.\"product_id\" FROM \"foodmart\".\"product\" e1 "
           + "LEFT JOIN \"foodmart\".\"product\" e3 "
           + "on e1.\"product_id\" = e3.\"product_id\""
           + ")"
           + ") selected where 1 in\n"
           + "(select \"gross_weight\" from \"foodmart\".\"product\" e2 "
           + "where e2.\"product_id\" = selected.\"product_id\" and 
e2.\"product_id\" > 10)";
   
       final String expected =
           "SELECT *\nFROM (SELECT \"product\".\"product_id\"\nFROM 
\"foodmart\".\"product\"\n"
               + "LEFT JOIN \"foodmart\".\"product\" AS \"product0\" "
               + "ON \"product\".\"product_id\" = \"product0\".\"product_id\") 
AS \"t\"\n"
               + "WHERE CAST(1 AS DOUBLE) IN ("
               + "SELECT \"gross_weight\"\nFROM \"foodmart\".\"product\"\n"
               + "WHERE \"product_id\" = \"t\".\"product_id\" AND 
\"product_id\" > 10)";
   
       sql(sql).ok(expected);
     }
   ```
   
   Waiting for CI to see if everything `IN`-related is good


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to