ILuffZhe commented on code in PR #4151:
URL: https://github.com/apache/calcite/pull/4151#discussion_r1920937599


##########
core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java:
##########
@@ -7960,6 +7960,30 @@ private void checkLiteral2(String expression, String 
expected) {
         .withBigQuery().ok(expectedBiqquery);
   }
 
+  /** Test case for
+   * <a 
href="https://issues.apache.org/jira/browse/CALCITE-6756";>[CALCITE-6756]
+   * Preserving CAST of STRING operand in binary comparison for 
PostgreSQL</a>. */
+  @Test void testImplicitTypeCoercionPostgreSQL() {
+    final String query = "select \"employee_id\" "
+        + "from \"foodmart\".\"employee\" "
+        + "where 10 = cast(\"full_name\" as int) and "
+        + "  \"first_name\" > cast(10 as varchar) and "
+        + "\"birth_date\" = cast('1914-02-02' as date) or "

Review Comment:
   Why not add a filter like `cast('10' as varchar)  = 1`.



-- 
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: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to