diff --git a/src/frontend/src/optimizer/rule/batch/batch_iceberg_predicate_pushdown.rs b/src/frontend/src/optimizer/rule/batch/batch_iceberg_predicate_pushdown.rs index cc6a23ca3936c..8df8777d59384 100644 --- a/src/frontend/src/optimizer/rule/batch/batch_iceberg_predicate_pushdown.rs +++ b/src/frontend/src/optimizer/rule/batch/batch_iceberg_predicate_pushdown.rs @@ -45,13 +45,17 @@ impl Rule for BatchIcebergPredicatePushDownRule { assert_eq!(scan.predicate, IcebergPredicate::AlwaysTrue); let predicate = filter.predicate().clone(); - let (iceberg_predicate, new_predicate) = + let (iceberg_predicate, rw_predicate) = rw_predicate_to_iceberg_predicate(predicate, scan.schema().fields()); let scan = scan.clone_with_predicate(iceberg_predicate); - let filter = filter - .clone_with_input(scan.into()) - .clone_with_predicate(new_predicate); - Some(filter.into()) + if rw_predicate.always_true() { + Some(scan.into()) + } else { + let filter = filter + .clone_with_input(scan.into()) + .clone_with_predicate(rw_predicate); + Some(filter.into()) + } } }