Skip to content

Commit 0736498

Browse files
committed
fix test
1 parent 992ef72 commit 0736498

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

paimon-common/src/main/java/org/apache/paimon/utils/PredicateUtils.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import org.apache.paimon.predicate.PredicateBuilder;
3030
import org.apache.paimon.predicate.Transform;
3131

32+
import javax.annotation.Nullable;
3233
import java.util.ArrayList;
3334
import java.util.Arrays;
3435
import java.util.HashMap;
@@ -46,8 +47,8 @@ public class PredicateUtils {
4647
* predicates of an {@code AND}, for example: {@code OR(a >= 1, AND(b >= 1, b <= 2))} will be
4748
* rewritten to {@code OR(a >= 1, BETWEEN(b, 1, 2))}.
4849
*/
49-
public static Predicate tryRewriteBetweenPredicate(Predicate filter) {
50-
if (filter instanceof LeafPredicate) {
50+
public static Predicate tryRewriteBetweenPredicate(@Nullable Predicate filter) {
51+
if (filter == null || filter instanceof LeafPredicate) {
5152
return filter;
5253
}
5354
CompoundPredicate compoundPredicate = (CompoundPredicate) filter;

0 commit comments

Comments
 (0)