From 8bea69e2079feb96a37b6a420aa5610ada339f00 Mon Sep 17 00:00:00 2001 From: Steve Vaughan Jr Date: Thu, 28 Mar 2024 12:51:46 -0400 Subject: [PATCH] Revert scope change to statsTrackers --- .../datasources/InsertIntoHadoopFsRelationCommand.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/InsertIntoHadoopFsRelationCommand.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/InsertIntoHadoopFsRelationCommand.scala index 8e73c10bc0f5b..fe6ec094812e8 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/InsertIntoHadoopFsRelationCommand.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/InsertIntoHadoopFsRelationCommand.scala @@ -174,7 +174,6 @@ case class InsertIntoHadoopFsRelationCommand( qualifiedOutputPath } - val statsTrackers = Seq(basicWriteJobStatsTracker(hadoopConf)) val updatedPartitionPaths = FileFormatWriter.write( sparkSession = sparkSession, @@ -186,10 +185,11 @@ case class InsertIntoHadoopFsRelationCommand( hadoopConf = hadoopConf, partitionColumns = partitionColumns, bucketSpec = bucketSpec, - statsTrackers = statsTrackers, + statsTrackers = Seq(basicWriteJobStatsTracker(hadoopConf)), options = options, numStaticPartitionCols = staticPartitions.size) + // update metastore partition metadata if (updatedPartitionPaths.isEmpty && staticPartitions.nonEmpty && partitionColumns.length == staticPartitions.size) {