spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [spark] vanzin commented on a change in pull request #25863: [SPARK-28945][SPARK-29037][CORE][SQL] Fix the issue that spark gives duplicate result and support concurrent file source write operations write to different partitions in the same table.
Date Fri, 27 Sep 2019 00:31:42 GMT
vanzin commented on a change in pull request #25863: [SPARK-28945][SPARK-29037][CORE][SQL]
Fix the issue that spark gives duplicate result and support concurrent file source write operations
write to different partitions in the same table.
URL: https://github.com/apache/spark/pull/25863#discussion_r328875372
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/InsertIntoHadoopFsRelationCommand.scala
 ##########
 @@ -263,4 +280,107 @@ case class InsertIntoHadoopFsRelationCommand(
       }
     }.toMap
   }
+
+  /**
+   * Detect the conflict when there are several InsertIntoHadoopFsRelation operations
+   * write to same partition in the same table or a non-partitioned table concurrently.
+   */
+  private def detectConflict(
+      fs: FileSystem,
+      path: Path,
+      staticPartitionKVs: Seq[(String, String)]): Unit = {
+    for (i <- 0 until partitionColumns.size) {
 
 Review comment:
   The scaladoc mentions non-partitioned tables; won't `partitionColumns.size` be 0 in that
case, in which case this will always pass?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message