cloud-fan commented on a change in pull request #33650:
URL: https://github.com/apache/spark/pull/33650#discussion_r689458287
##########
File path:
external/avro/src/main/scala/org/apache/spark/sql/v2/avro/AvroScanBuilder.scala
##########
@@ -50,7 +52,7 @@ class AvroScanBuilder (
if (sparkSession.sessionState.conf.avroFilterPushDown) {
Review comment:
I think this is a bug in file source v2. This conf should only affect
avro filter pushdown, but not partition pruning (you can check file source v1).
The fix should be
```
abstract class FileScanBuilder ... with SupportsPushDownFilters {
...
protected var partitionFilters = Seq.empty[Filter]
protected var dataFilters = Seq.empty[Filter]
override def pushFilters(filters: Array[Filter]): Array[Filter] = {
// split the filters
pushDataFilters()
}
// Overwrite it if source supports filter pushdown
protected def pushDataFilters(): Seq[Filter] = dataFilters
}
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]