soin08 commented on code in PR #28982:
URL: https://github.com/apache/flink/pull/28982#discussion_r3796420113
##########
flink-libraries/flink-state-processing-api/src/test/java/org/apache/flink/state/table/SavepointDynamicTableSourceTest.java:
##########
@@ -394,6 +394,32 @@ void
testOrAcrossKeyAndNonKeyColumnIsNotPushedDownButReturnsCorrectResult() thro
assertThat(result.get(1).getField("k")).isEqualTo(5L);
}
+ @Test
+ void testOrOfExactAndRangeOnKeyIsNotPushedDownButReturnsCorrectResult()
throws Exception {
+ // The planner hands this over intact as or(equals(k, 1),
greaterThan(k, 5)), but OR only
+ // merges finite key sets, so a range branch makes the whole
disjunction non-pushable.
+ StreamTableEnvironment tEnv = createBatchTableEnv();
+ tEnv.executeSql(STATE_TABLE_DDL);
+
+ String sql = "SELECT k FROM state_table WHERE k = 1 OR k > 5 ORDER BY
k";
+
+ assertThat(hasPushedDownFilter(tEnv, sql)).isFalse();
+ assertThat(collectKeys(tEnv, sql)).containsExactly(1L, 6L, 7L, 8L, 9L);
+ }
+
+ @Test
+ void testOrOfTwoRangesOnKeyIsNotPushedDownButReturnsCorrectResult() throws
Exception {
Review Comment:
also will be supported in the next MR
--
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]