gortiz commented on code in PR #15277: URL: https://github.com/apache/pinot/pull/15277#discussion_r2005704100
########## pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotQueryResource.java: ########## @@ -105,47 +104,41 @@ public class PinotQueryResource { @POST @Path("sql") @ManualAuthorization // performed by broker - public String handlePostSql(String requestJsonStr, @Context HttpHeaders httpHeaders) { + public StreamingOutput handlePostSql(String requestJsonStr, @Context HttpHeaders httpHeaders) { Review Comment: The advantage of returning a StreamingOutput instead of a String is double: 1. We don't need to allocate the response on heap. Instead we can just pipeline the response from the broker. We use the same trick in LocalLogFileServer and TablesResource. 2. We can start to pipeline results to the customer as soon as the first bytes from broker arrive. Before we had to wait until the whole response was received in the controller. -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org