gortiz commented on code in PR #13733: URL: https://github.com/apache/pinot/pull/13733#discussion_r1765145450
########## pinot-query-runtime/src/main/java/org/apache/pinot/query/service/dispatch/DispatchClient.java: ########## @@ -50,12 +51,17 @@ public ManagedChannel getChannel() { } public void submit(Worker.QueryRequest request, QueryServerInstance virtualServer, Deadline deadline, - Consumer<AsyncQueryDispatchResponse> callback) { - _dispatchStub.withDeadline(deadline).submit(request, new DispatchObserver(virtualServer, callback)); + Consumer<AsyncResponse<Worker.QueryResponse>> callback) { + _dispatchStub.withDeadline(deadline).submit(request, new LastValueDispatchObserver<>(virtualServer, callback)); } public void cancel(long requestId) { Worker.CancelRequest cancelRequest = Worker.CancelRequest.newBuilder().setRequestId(requestId).build(); _dispatchStub.cancel(cancelRequest, NO_OP_CANCEL_STREAM_OBSERVER); } + + public void explain(Worker.QueryRequest request, QueryServerInstance virtualServer, Deadline deadline, + Consumer<AsyncResponse<List<Worker.ExplainResponse>>> callback) { + _dispatchStub.withDeadline(deadline).explain(request, new AllValuesDispatchObserver<>(virtualServer, callback)); Review Comment: You are right, the Submit endpoint is not defined as stream, so it makes sense to only keep the last (as only 1 is expected). BTW I don't think submit is used for V1. Remember we have two classes called QueryServer. `org.apache.pinot.query.service.server.QueryServer` is the one used in V2 and `org.apache.pinot.core.transport.QueryServer` is the one used in V1. Then we have ` org.apache.pinot.core.transport.grpc.GrpcQueryServer`. The later is used to execute V1 queries using GPRC and implements the protocol defined in `server.proto`. -- 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