diff --git a/paimon-spark/paimon-spark-common/src/main/scala/org/apache/paimon/spark/catalyst/analysis/expressions/ExpressionHelper.scala b/paimon-spark/paimon-spark-common/src/main/scala/org/apache/paimon/spark/catalyst/analysis/expressions/ExpressionHelper.scala index 480546201ccb..2eef2c41aebe 100644 --- a/paimon-spark/paimon-spark-common/src/main/scala/org/apache/paimon/spark/catalyst/analysis/expressions/ExpressionHelper.scala +++ b/paimon-spark/paimon-spark-common/src/main/scala/org/apache/paimon/spark/catalyst/analysis/expressions/ExpressionHelper.scala @@ -180,12 +180,11 @@ trait ExpressionHelper extends PredicateHelper { } filter }) - .toArray - if (filters.isEmpty) { + val predicates = filters.map(converter.convert(_, ignorePartialFailure)).filter(_ != null) + if (predicates.isEmpty) { None } else { - val predicates = filters.map(converter.convert(_, ignorePartialFailure)) Some(PredicateBuilder.and(predicates: _*)) } }