iodone opened a new issue, #2285:
URL: https://github.com/apache/incubator-kyuubi/issues/2285

   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   
   
   ### Search before asking
   
   - [X] I have searched in the 
[issues](https://github.com/apache/incubator-kyuubi/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### What would you like to be improved?
   
   The advantage of the trino engine is the ability to stream returned data, 
kyuubi as a proxy should not remove this feature, storing the result set all in 
memory will lead to performance and OOM problems. 
   
https://github.com/apache/incubator-kyuubi/blob/6a231519454c5d75aca2120de140c06febf7ae54/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/TrinoStatement.scala#L81-L135
   
   The iterator in this code is a direct conversion of ArrayBuffer, not a real 
stream iterator, and in each call to getNextResultSet, there is no real call to 
`Trino.client `to get the next result each time. @hddong WDYT?
   
   
   
   ### How should we improve?
   
   1. Trino's proxy implementation should be based entirely on the incremental 
collect model.
   2. Based on `IterableFetchIterator` to implement Trino DataResult Iterator, 
we can refer to Trino-JDBC's `ResultSet` implementation.
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!


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