@@ -60,9 +60,7 @@ class FilePartitionPlanner(
6060 val optimizerMetadataTimeNs = relation.location.metadataOpsTimeNs.getOrElse(0L )
6161 val startTime = System .nanoTime()
6262 val ret =
63- relation.location.listFiles(
64- partitionFilters.filterNot(isDynamicPruningFilter),
65- dataFilters)
63+ relation.location.listFiles(partitionFilters.filterNot(isDynamicPruningFilter), dataFilters)
6664 setFilesNumAndSizeMetric(ret, true )
6765 val timeTakenMs =
6866 NANOSECONDS .toMillis((System .nanoTime() - startTime) + optimizerMetadataTimeNs)
@@ -115,12 +113,10 @@ class FilePartitionPlanner(
115113 * Send the driver-side metrics. Before calling this function, selectedPartitions has been
116114 * initialized. See SPARK-26327 for more details.
117115 */
118- def sendDriverMetrics (
119- metricsMap : Map [String , SQLMetric ],
120- sparkContext : SparkContext ): Unit = {
116+ def sendDriverMetrics (metricsMap : Map [String , SQLMetric ], sparkContext : SparkContext ): Unit = {
121117 accumulatedMetrics.foreach(e => metricsMap(e._1).add(e._2))
122- val executionId = sparkContext.getLocalProperty(
123- org.apache.spark.sql.execution.SQLExecution .EXECUTION_ID_KEY )
118+ val executionId =
119+ sparkContext.getLocalProperty( org.apache.spark.sql.execution.SQLExecution .EXECUTION_ID_KEY )
124120 org.apache.spark.sql.execution.metric.SQLMetrics .postDriverMetricUpdates(
125121 sparkContext,
126122 executionId,
@@ -166,8 +162,7 @@ class FilePartitionPlanner(
166162 .groupBy { f =>
167163 BucketingUtils
168164 .getBucketId(new Path (f.filePath.toString()).getName)
169- .getOrElse(
170- throw QueryExecutionErrors .invalidBucketFile(f.filePath.toString()))
165+ .getOrElse(throw QueryExecutionErrors .invalidBucketFile(f.filePath.toString()))
171166 }
172167
173168 val prunedFilesGroupedToBuckets = if (optionalBucketSet.isDefined) {
@@ -196,9 +191,7 @@ class FilePartitionPlanner(
196191 }
197192 .getOrElse {
198193 Seq .tabulate(bucketSpec.numBuckets) { bucketId =>
199- FilePartition (
200- bucketId,
201- prunedFilesGroupedToBuckets.getOrElse(bucketId, Array .empty))
194+ FilePartition (bucketId, prunedFilesGroupedToBuckets.getOrElse(bucketId, Array .empty))
202195 }
203196 }
204197 }
@@ -256,9 +249,6 @@ class FilePartitionPlanner(
256249 }
257250 .sortBy(_.length)(implicitly[Ordering [Long ]].reverse)
258251
259- FilePartition .getFilePartitions(
260- relation.sparkSession,
261- splitFiles,
262- maxSplitBytes)
252+ FilePartition .getFilePartitions(relation.sparkSession, splitFiles, maxSplitBytes)
263253 }
264254}
0 commit comments