>From Murtadha Hubail <[email protected]>: Murtadha Hubail has submitted this change. ( https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18194 )
Change subject: [NO ISSUE][OTH] Extensible Response Results ...................................................................... [NO ISSUE][OTH] Extensible Response Results - user model changes: no - storage format changes: no - interface changes: no Details: - Pass executionState to buildResponseResults to make it more extensible. Change-Id: I0007ebc0dd2167df2d06a6aecca9367ab60c4bdb Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18194 Integration-Tests: Jenkins <[email protected]> Tested-by: Jenkins <[email protected]> Reviewed-by: Ali Alsuliman <[email protected]> --- M asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryServiceServlet.java M asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/NCQueryServiceServlet.java 2 files changed, 26 insertions(+), 3 deletions(-) Approvals: Ali Alsuliman: Looks good to me, approved Jenkins: Verified; Verified Objections: Anon. E. Moose #1000171: Violations found diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/NCQueryServiceServlet.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/NCQueryServiceServlet.java index 1809166..65d4734 100644 --- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/NCQueryServiceServlet.java +++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/NCQueryServiceServlet.java @@ -133,7 +133,7 @@ new NcResultPrinter(appCtx, responseMsg, getResultSet(), delivery, sessionOutput, stats)); } warnings.addAll(responseMsg.getWarnings()); - buildResponseResults(responsePrinter, sessionOutput, responseMsg.getExecutionPlans(), warnings); + buildResponseResults(responsePrinter, sessionOutput, responseMsg.getExecutionPlans(), warnings, executionState); } protected void ensureOptionalParameters(Map<String, String> optionalParameters) throws HyracksDataException { diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryServiceServlet.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryServiceServlet.java index 61591f4..165cc75 100644 --- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryServiceServlet.java +++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryServiceServlet.java @@ -347,7 +347,8 @@ } protected void buildResponseResults(ResponsePrinter responsePrinter, SessionOutput sessionOutput, - ExecutionPlans plans, List<Warning> warnings) throws HyracksDataException { + ExecutionPlans plans, List<Warning> warnings, RequestExecutionState executionState) + throws HyracksDataException { responsePrinter.addResultPrinter(new PlansPrinter(plans, sessionOutput.config().getPlanFormat())); if (!warnings.isEmpty()) { List<ICodedMessage> codedWarnings = new ArrayList<>(); @@ -423,7 +424,7 @@ executionState.end(); translator.getWarnings(warnings, maxWarnings - warnings.size()); stats.updateTotalWarningsCount(parserTotalWarningsCount); - buildResponseResults(responsePrinter, sessionOutput, translator.getExecutionPlans(), warnings); + buildResponseResults(responsePrinter, sessionOutput, translator.getExecutionPlans(), warnings, executionState); } protected boolean handleIFormattedException(IError error, IFormattedException ex, -- To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18194 To unsubscribe, or for help writing mail filters, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Change-Id: I0007ebc0dd2167df2d06a6aecca9367ab60c4bdb Gerrit-Change-Number: 18194 Gerrit-PatchSet: 2 Gerrit-Owner: Murtadha Hubail <[email protected]> Gerrit-Reviewer: Ali Alsuliman <[email protected]> Gerrit-Reviewer: Anon. E. Moose #1000171 Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-Reviewer: Murtadha Hubail <[email protected]> Gerrit-MessageType: merged
