hililiwei commented on code in PR #6092:
URL: https://github.com/apache/iceberg/pull/6092#discussion_r1010490834
##########
flink/v1.16/flink/src/test/java/org/apache/iceberg/flink/source/TestFlinkTableSource.java:
##########
@@ -602,53 +602,8 @@ public void testFilterPushDown2Literal() {
"Should not push down a filter", Expressions.alwaysTrue(),
lastScanEvent.filter());
}
- /**
- * NaN is not supported by flink now, so we add the test case to assert the
parse error, when we
- * upgrade the flink that supports NaN, we will delele the method, and add
some test case to test
- * NaN.
- */
- @Test
- public void testSqlParseError() {
- String sqlParseErrorEqual =
- String.format("SELECT * FROM %s WHERE d = CAST('NaN' AS DOUBLE) ",
TABLE_NAME);
- AssertHelpers.assertThrows(
- "The NaN is not supported by flink now. ",
- NumberFormatException.class,
- () -> sql(sqlParseErrorEqual));
-
- String sqlParseErrorNotEqual =
- String.format("SELECT * FROM %s WHERE d <> CAST('NaN' AS DOUBLE) ",
TABLE_NAME);
- AssertHelpers.assertThrows(
- "The NaN is not supported by flink now. ",
- NumberFormatException.class,
- () -> sql(sqlParseErrorNotEqual));
-
- String sqlParseErrorGT =
- String.format("SELECT * FROM %s WHERE d > CAST('NaN' AS DOUBLE) ",
TABLE_NAME);
- AssertHelpers.assertThrows(
- "The NaN is not supported by flink now. ",
- NumberFormatException.class,
- () -> sql(sqlParseErrorGT));
-
- String sqlParseErrorLT =
- String.format("SELECT * FROM %s WHERE d < CAST('NaN' AS DOUBLE) ",
TABLE_NAME);
- AssertHelpers.assertThrows(
- "The NaN is not supported by flink now. ",
- NumberFormatException.class,
- () -> sql(sqlParseErrorLT));
-
- String sqlParseErrorGTE =
- String.format("SELECT * FROM %s WHERE d >= CAST('NaN' AS DOUBLE) ",
TABLE_NAME);
- AssertHelpers.assertThrows(
- "The NaN is not supported by flink now. ",
- NumberFormatException.class,
- () -> sql(sqlParseErrorGTE));
-
- String sqlParseErrorLTE =
- String.format("SELECT * FROM %s WHERE d <= CAST('NaN' AS DOUBLE) ",
TABLE_NAME);
- AssertHelpers.assertThrows(
- "The NaN is not supported by flink now. ",
- NumberFormatException.class,
- () -> sql(sqlParseErrorLTE));
+ @Test
+ public void testSqlParseNaN() {
+ // todo add some test case to test NaN
Review Comment:
TODO: After the introduction of 1.16, we need to adapt NaN.
From my preliminary tests, we need to make some changes in the flink
source/sink filter section.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]