[UT] [BugFix] Fix FineGrainedRangePredicateRule rule bug (#63148)

Signed-off-by: shuming.li <ming.moriarty@gmail.com>
This commit is contained in:
shuming.li 2025-09-16 10:32:51 +08:00 committed by GitHub
parent 960bc35302
commit d96e17baa8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 9 additions and 5 deletions

View File

@ -322,13 +322,17 @@ public class FineGrainedRangePredicateRule extends TransformationRule {
List<BinaryPredicateOperator> colPredicates) {
BinaryPredicateOperator leftDayBeginPredicate = colPredicates.get(0);
BinaryPredicateOperator rightDayEndPredicate = colPredicates.get(1);
BinaryType firstType = leftDayBeginPredicate.getBinaryType();
BinaryType secondType = rightDayEndPredicate.getBinaryType();
// make sure predicate is "col >= left And col <= right"
if (BinaryType.LE.equals(firstType) || BinaryType.LT.equals(firstType)) {
Collections.swap(colPredicates, 0, 1);
// swap left and right to keep the correct order
leftDayBeginPredicate = colPredicates.get(0);
rightDayEndPredicate = colPredicates.get(1);
firstType = leftDayBeginPredicate.getBinaryType();
secondType = rightDayEndPredicate.getBinaryType();
}
// calculate time points first

View File

@ -1,4 +1,4 @@
-- name: test_ivm_with_iceberg_join
-- name: test_ivm_with_iceberg_join @slow
create external catalog mv_iceberg_${uuid0}
properties
(

View File

@ -1,4 +1,4 @@
-- name: test_ivm_with_iceberg_join
-- name: test_ivm_with_iceberg_join @slow
create external catalog mv_iceberg_${uuid0}
properties
(

View File

@ -1,4 +1,4 @@
-- name: test_mv_refresh_with_multi_union1
-- name: test_mv_refresh_with_date_trunc_week @slow
CREATE TABLE `u1` (
`id` int(11) NOT NULL,
`dt` date NOT NULL

View File

@ -1,4 +1,4 @@
-- name: test_mv_refresh_with_multi_union1
-- name: test_mv_refresh_with_date_trunc_week @slow
CREATE TABLE `u1` (
`id` int(11) NOT NULL,