[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 <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Ali Alsuliman <ali.al.solaiman@gmail.com>
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,