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


##########
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:
   This expression is illegal in PostgreSQL. But after the dialect is 
converted,  it can work well.



-- 
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