yuexing commented on code in PR #51113: URL: https://github.com/apache/spark/pull/51113#discussion_r2152393220
########## sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala: ########## @@ -2152,11 +2152,20 @@ private[sql] object QueryExecutionErrors extends QueryErrorsBase with ExecutionE cause = failureReason) } - def foreachWriterAbortedDueToTaskFailureError(): Throwable = { + def foreachWriterAbortedDueToTaskFailureError(errors: Seq[Throwable] = Seq.empty): Throwable = { Review Comment: oh, wait! Let me revert the change. I shouldn't have changed this interface. foreachWriterAbortedDueToTaskFailureError is **only** called when an error happens **but not** during write stage, as in code ``` class ForeachDataWriter[T] { ... def abort(): Unit = { if (errorOrNull == null) { errorOrNull = QueryExecutionErrors.foreachWriterAbortedDueToTaskFailureError() } } ``` when the error happens in write, it will be captured in errorOrNull, and is handled by close ``` class ForeachDataWriter[T] { ... override def close(): Unit = { writer.close(errorOrNull) } ``` -- 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-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org