You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/02/03 05:37:59 UTC
[GitHub] [spark] fuwhu commented on a change in pull request #27232:
[SPARK-30525][SQL]HiveTableScanExec do not need to prune partitions again
after pushing down to SessionCatalog for partition pruning
fuwhu commented on a change in pull request #27232: [SPARK-30525][SQL]HiveTableScanExec do not need to prune partitions again after pushing down to SessionCatalog for partition pruning
URL: https://github.com/apache/spark/pull/27232#discussion_r373928619
##########
File path: sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/HiveTableScanExec.scala
##########
@@ -162,11 +162,29 @@ case class HiveTableScanExec(
}
}
+ @transient lazy val prunedPartitions: Seq[HivePartition] = {
+ if (relation.prunedPartitions.nonEmpty) {
+ val hivePartitions =
+ relation.prunedPartitions.get.map(HiveClientImpl.toHivePartition(_, hiveQlTable))
+ if (partitionPruningPred.forall(!ExecSubqueryExpression.hasSubquery(_))) {
+ hivePartitions
+ } else {
+ prunePartitions(hivePartitions)
+ }
+ } else {
+ if (sparkSession.sessionState.conf.metastorePartitionPruning) {
Review comment:
sure, added.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org