JingsongLi commented on code in PR #6817:
URL: https://github.com/apache/paimon/pull/6817#discussion_r2621678311
##########
paimon-spark/paimon-spark-common/src/main/scala/org/apache/paimon/spark/ColumnPruningAndPushDown.scala:
##########
@@ -82,12 +92,14 @@ trait ColumnPruningAndPushDown extends Scan with Logging {
lazy val readBuilder: ReadBuilder = {
val _readBuilder = table.newReadBuilder().withReadType(readTableRowType)
- if (filters.nonEmpty) {
- val pushedPredicate = PredicateBuilder.and(filters: _*)
- _readBuilder.withFilter(pushedPredicate)
+ if (pushedPartitionFilters.nonEmpty) {
+ _readBuilder.withPartitionFilter(new
AndPartitionPredicate(pushedPartitionFilters.asJava))
Review Comment:
Do not wrap to `AndPartitionPredicate`, if size is 1, we can introduce
`PartitionPredicate.and` static method.
--
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]