LuciferYang commented on code in PR #46811:
URL: https://github.com/apache/spark/pull/46811#discussion_r1621698631
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/FileWriterFactory.scala:
##########
@@ -38,7 +38,7 @@ case class FileWriterFactory (
@transient private lazy val jobId =
SparkHadoopWriterUtils.createJobID(jobTrackerID, 0)
override def createWriter(partitionId: Int, realTaskId: Long):
DataWriter[InternalRow] = {
- val taskAttemptContext = createTaskAttemptContext(partitionId)
+ val taskAttemptContext = createTaskAttemptContext(partitionId,
realTaskId.toInt & Int.MaxValue)
Review Comment:
https://github.com/apache/spark/blob/80addbbddab73980a0ea0672dac5634465c1997b/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/WriteFiles.scala#L97
https://github.com/apache/spark/blob/45ba9224602eb18fe45e339cbb8cf2e8a4924f0b/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileFormatWriter.scala#L263
There are at least two other similar cases here, should we unify them as
`math.abs`? Of course, this should be another PR. @cloud-fan
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]