LuciferYang commented on a change in pull request #26971: [SPARK-30320][SQL]
Fix insert overwrite to DataSource table with dynamic partition error
URL: https://github.com/apache/spark/pull/26971#discussion_r361285818
##########
File path:
core/src/main/scala/org/apache/spark/internal/io/HadoopMapReduceCommitProtocol.scala
##########
@@ -167,8 +169,8 @@ class HadoopMapReduceCommitProtocol(
committer.commitJob(jobContext)
if (hasValidPath) {
- val (allAbsPathFiles, allPartitionPaths) =
- taskCommits.map(_.obj.asInstanceOf[(Map[String, String],
Set[String])]).unzip
+ val (allAbsPathFiles, allPartitionPaths, successAttemptIDs) =
Review comment:
Should we add implicit function like
```
implicit def asPair(x:(Map[String, String], Set[String], String)) = (x._1,
(x._2, x._3))
```
before line 172, then we can `unzip` taskCommits as `(Map[String, String],
(Set[String], String))` and reduce re-`zip` at line 188
----------------------------------------------------------------
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]