juliuszsompolski commented on code in PR #42320:
URL: https://github.com/apache/spark/pull/42320#discussion_r1283101427


##########
connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/connect/client/ExecutePlanResponseReattachableIterator.scala:
##########
@@ -52,7 +52,7 @@ class ExecutePlanResponseReattachableIterator(
     request: proto.ExecutePlanRequest,
     channel: ManagedChannel,
     retryPolicy: GrpcRetryHandler.RetryPolicy)
-    extends java.util.Iterator[proto.ExecutePlanResponse]
+    extends AutoConsumableIterator[proto.ExecutePlanResponse]

Review Comment:
   Consuming the iterator like AutoConsumableIterator does involve waiting for 
the execution to complete server side, and receiving all results from it. It 
may not be the intention of the user to wait for it when they abandon / close 
iterator.
   Closing the iterator here should involve first sending an Interrupt to the 
server, and then a ReleaseExecute request.



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