You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "jeanlyn (via GitHub)" <gi...@apache.org> on 2023/08/01 11:31:09 UTC

[GitHub] [spark] jeanlyn commented on a diff in pull request #41628: [SPARK-38230][SQL] InsertIntoHadoopFsRelationCommand unnecessarily fetches details of partitions

jeanlyn commented on code in PR #41628:
URL: https://github.com/apache/spark/pull/41628#discussion_r1280493161


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/InsertIntoHadoopFsRelationCommand.scala:
##########
@@ -162,33 +193,36 @@ case class InsertIntoHadoopFsRelationCommand(
                 retainData = true /* already deleted */).run(sparkSession)
             }
           }
+          // The `customPartitionLocations` is getting from writing paths. Hence, it need to move
+          // files from `qualifiedOutputPath` to custom location.
+          if (updatedPartitions.nonEmpty && dynamicPartitionOverwrite) {

Review Comment:
   Yes, the change related to this pr, because the pre-generated path has no metadata information, so all files write to the default partition path, if there is some custom partition path, we need to move the data to the custom partition inside. Maybe `customPartitionLocations.nonEmpty` is more accurate here.



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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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