garlandz-db commented on code in PR #54689:
URL: https://github.com/apache/spark/pull/54689#discussion_r2959894809
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/arrow/ArrowFileReadWrite.scala:
##########
@@ -39,22 +39,28 @@ private[sql] class SparkArrowFileWriter(schema: Schema,
path: Path) extends Auto
protected val fileWriter =
new ArrowFileWriter(root, null,
Channels.newChannel(Files.newOutputStream(path)))
+ private var fileWriterClosed = false
+
override def close(): Unit = {
- fileWriter.close()
Review Comment:
this can lead to two calls if it was closed in write midway but we call
.close again . the fix is to add flag
--
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]