andygrove commented on code in PR #6243:
URL: https://github.com/apache/datafusion-comet/pull/6243#discussion_r4184290945
##########
spark/src/main/scala/org/apache/comet/CometExecIterator.scala:
##########
@@ -225,6 +226,15 @@ class CometExecIterator(
CometExecIterator.startMemoryUsageLog()
+ /**
+ * What the producer behind one of this plan's Arrow stream inputs threw
while native pulled a
+ * batch from it, if anything. See `CometArrowStream.inputFailure`.
+ */
+ private def inputFailure: Option[Throwable] =
+ inputObjects.iterator
+ .collect { case stream: ArrowArrayStream =>
CometArrowStream.inputFailure(stream) }
Review Comment:
You're right, #6372 dropped the import and the merge took main's version
without a conflict, so it did not compile. The import is back in the merge of
main (482ce2706), and the merged tree builds and passes the new tests.
##########
spark/src/main/scala/org/apache/spark/sql/comet/execution/arrow/CometNativeArrowSource.scala:
##########
@@ -248,14 +255,69 @@ object CometArrowStream extends Logging {
}
if (context != null) {
val streamRef = arrowStream
+ exportedReaders.put(streamRef, reader)
context.addTaskCompletionListener[Unit] { _ =>
+ exportedReaders.remove(streamRef)
Review Comment:
It ended up that way in the merge of main (482ce2706).
`exportedReaders.remove(streamRef)` is the first statement in the listener,
ahead of `release()` and `close()`, so a throwing `release()` cannot leave the
entry behind in the map.
--
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]