rdblue commented on code in PR #6402:
URL: https://github.com/apache/iceberg/pull/6402#discussion_r1050278958


##########
flink/v1.16/flink/src/test/java/org/apache/iceberg/flink/source/TestFlinkTableSource.java:
##########
@@ -603,7 +605,103 @@ public void testFilterPushDown2Literal() {
   }
 
   @Test
-  public void testSqlParseNaN() {
-    // todo add some test case to test NaN
+  public void testFilterNaN() {
+    sql(
+        "CREATE TABLE %s (id INT, data VARCHAR,d DOUBLE, f FLOAT) WITH 
('write.format.default'='%s')",
+        TABLE_NAME_NAN, format.name());
+    sql(
+        "INSERT INTO %s VALUES (1,'iceberg',10, 
1.1),(2,'b',20,2.2),(3,CAST(NULL AS VARCHAR),30,3.3),(4,'d',CAST('NaN' AS 
DOUBLE),4.4)",
+        TABLE_NAME_NAN);
+
+    String sqlNaNDoubleEqual =
+        String.format("SELECT * FROM %s  WHERE d = CAST('NaN' AS DOUBLE)  ", 
TABLE_NAME_NAN);
+    List<Row> resultDoubleEqual = sql(sqlNaNDoubleEqual);
+    Assert.assertEquals("Should have 0 records", 0, resultDoubleEqual.size());

Review Comment:
   See my note below on this.



-- 
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: issues-unsubscr...@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to