AngersZhuuuu commented on a change in pull request #31179:
URL: https://github.com/apache/spark/pull/31179#discussion_r605371258



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileFormatDataWriter.scala
##########
@@ -251,7 +252,18 @@ class DynamicPartitionDataWriter(
       // See a new partition or bucket - write to a new partition dir (or a 
new bucket file).
       if (isPartitioned && currentPartitionValues != nextPartitionValues) {
         currentPartitionValues = Some(nextPartitionValues.get.copy())
-        statsTrackers.foreach(_.newPartition(currentPartitionValues.get))
+        val partitionSpec: Map[String, String] = 
description.partitionColumns.map(attr => {
+          val proj = UnsafeProjection.create(Seq(attr), 
description.partitionColumns)

Review comment:
       > These `UnsafeProjection` objects can be created and reused?
   
   Seems we don't need this, remove this now.




-- 
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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to