LuciferYang commented on PR #43745:
URL: https://github.com/apache/spark/pull/43745#issuecomment-1805916103

   > MEDIUM_RESULTS_QUERY
   
   
   
   > @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 seems like a server-side test case, but the pr is modifying the client 
API implementation. In the future, if a server-side test case fails and we need 
to fix some client API, this logic seems a bit non-intuitive. So before making 
any changes, let me investigate how to directly test the API to be fixed on the 
client-side. 


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