xuzifu666 commented on code in PR #4838:
URL: https://github.com/apache/calcite/pull/4838#discussion_r2940467068


##########
core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java:
##########
@@ -11913,5 +11913,41 @@ public Sql schema(CalciteAssert.SchemaSpec schemaSpec) 
{
         .schema(CalciteAssert.SchemaSpec.JDBC_SCOTT)
         .ok(expected2);
   }
+  /** Test cases for
+   * <a 
href="https://issues.apache.org/jira/browse/CALCITE-7432";>[CALCITE-7432]
+   * NumberFormatException when convert `NaN` literal to sql</a>.
+   */
+  @Test void testCastNaNToDouble() {
+    final String sql = "select cast('NaN' as DOUBLE)";
+    final String expected = "SELECT *\n"
+        + "FROM (VALUES (CAST('NaN' AS DOUBLE))) AS \"t\" (\"EXPR$0\")";
+    sql(sql).ok(expected);
+  }
 
+  @Test void testCastInfinityToDouble() {

Review Comment:
   Ideally, all related tests should be linked to Jira, or grouped into a 
single test method and separated by comments.



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