juliuszsompolski commented on PR #43745:
URL: https://github.com/apache/spark/pull/43745#issuecomment-1805634964
@LuciferYang I think this test in ReattachableExecuteSuite could work
```
test("Client execute iterator .toSeq consumes the reattachable iterator") {
// There are places in the code that use .toSeq on the iterator to make
sure it is fully
// consumed. Check that it works.
// (in scala 2.12, .toSeq results in a lazy stream, and .toBuffer.toSeq
is needed)
withClient { client =>
val iter = client.execute(buildPlan(MEDIUM_RESULTS_QUERY))
val reattachableIter = getReattachableIterator(iter)
iter.toSeq
assert(reattachableIter.resultComplete)
}
```
(just drafted it, haven't tested it myself)
--
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]