Kontinuation commented on code in PR #890:
URL: https://github.com/apache/datafusion-comet/pull/890#discussion_r1736832297


##########
common/src/main/scala/org/apache/spark/sql/comet/util/Utils.scala:
##########
@@ -215,12 +215,8 @@ object Utils {
       val writer = new ArrowStreamWriter(root, provider, 
Channels.newChannel(out))
       writer.start()
       writer.writeBatch()
-
       root.clear()
-      writer.end()
-
-      out.flush()
-      out.close()
+      writer.close()

Review Comment:
   This should be correct. The dictionary provider held by the writer [contains 
copied 
vectors](https://github.com/apache/arrow/blob/main/java/vector/src/main/java/org/apache/arrow/vector/ipc/ArrowStreamWriter.java#L159),
 so closing them does not interfere with the rest of the data structures.



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

Reply via email to