viirya commented on a change in pull request #25840: [SPARK-29166][SQL] Add a 
parameter to limit the number of dynamic partitions for data source table
URL: https://github.com/apache/spark/pull/25840#discussion_r325981618
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/SQLHadoopMapReduceCommitProtocol.scala
 ##########
 @@ -66,4 +68,18 @@ class SQLHadoopMapReduceCommitProtocol(
     logInfo(s"Using output committer class 
${committer.getClass.getCanonicalName}")
     committer
   }
+
+  override def newTaskTempFile(
+      taskContext: TaskAttemptContext, dir: Option[String], ext: String): 
String = {
+    val path = super.newTaskTempFile(taskContext, dir, ext)
+    if (dynamicPartitionOverwrite) {
+      val numParts = partitionPaths.size
+      if (numParts > maxDynamicPartitions) {
 
 Review comment:
   partitionPaths contains only the paths on a specific Spark task, isn't?

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

Reply via email to