Skip to content

Commit 2b155cc

Browse files
committed
[flink]add ltz test
1 parent 602ed14 commit 2b155cc

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

fluss-flink/fluss-flink-common/src/test/java/org/apache/fluss/flink/source/FlinkTableSourceITCase.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1080,7 +1080,18 @@ void testStreamingReadTimestampPartitionTypePushDown() throws Exception {
10801080
admin, tablePath1, Arrays.asList("2021-01-01-00-00-00_", "2021-01-02-00-00-00_"));
10811081

10821082
// TODO add test for timestamp_ltz
1083-
1083+
// Test query with TIMESTAMP_LTZ literal
1084+
String plan1 =
1085+
tEnv.explainSql(
1086+
"select * from partitioned_table_timestamp_ltz where c = cast(TIMESTAMP'2021-01-01 08:00:00' as timestamp_ltz(3)) ");
1087+
CloseableIterator<Row> collect =
1088+
tEnv.executeSql("select cast(TIMESTAMP'2021-01-01 08:00:00' as timestamp_ltz(3))")
1089+
.collect();
1090+
org.apache.flink.util.CloseableIterator<Row> rowIter1 =
1091+
tEnv.executeSql(
1092+
"select * from partitioned_table_timestamp_ltz where c = cast(TIMESTAMP'2021-01-01 08:00:00' as timestamp_ltz(3))")
1093+
.collect();
1094+
assertResultsIgnoreOrder(rowIter1, expectedRowValues1, true);
10841095
}
10851096

10861097
@Test

0 commit comments

Comments
 (0)