cloud-fan commented on a change in pull request #25600: [SPARK-11150][SQL]
Dynamic Partition Pruning
URL: https://github.com/apache/spark/pull/25600#discussion_r320617105
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/DataSourceScanExec.scala
##########
@@ -336,10 +367,36 @@ case class FileSourceScanExec(
inputRDD :: Nil
}
+ /** SQL metrics generated only for scans using dynamic partition pruning. */
+ private lazy val staticMetrics = if
(partitionFilters.filter(isDynamicPruningFilter).nonEmpty) {
+ Map("staticFilesNum" -> SQLMetrics.createMetric(sparkContext, "static
number of files read"),
+ "staticFilesSize" -> SQLMetrics.createSizeMetric(sparkContext, "static
size of files read"))
+ } else {
+ Map.empty[String, SQLMetric]
+ }
+
+ /** Helper for computing total number and size of files in selected
partitions. */
+ private def setFilesNumAndSizeMetric(
+ partitions: Seq[PartitionDirectory],
Review comment:
nit: 4 space indentation.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]