dongjoon-hyun commented on a change in pull request #33348:
URL: https://github.com/apache/spark/pull/33348#discussion_r670075180
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/CatalogFileIndex.scala
##########
@@ -94,6 +93,19 @@ class CatalogFileIndex(
}
}
+ private def listPartitionsByFilter(
+ table: CatalogTable,
+ partitionFilters: Seq[Expression]): Seq[CatalogTablePartition] = {
+ if (sparkSession.sessionState.conf.metastorePartitionPruning) {
+ sparkSession.sessionState.catalog.listPartitionsByFilter(
+ table.identifier, partitionFilters)
+ } else {
+ ExternalCatalogUtils.prunePartitionsByFilter(table,
+ sparkSession.sessionState.catalog.listPartitions(table.identifier),
+ partitionFilters, sparkSession.sessionState.conf.sessionLocalTimeZone)
+ }
+ }
Review comment:
Could you move this function to `ExternalCatalogUtils` like
`prunePartitionsByFilter`?
--
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]