This is an automated email from the ASF dual-hosted git repository.

imaxon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git

commit f57b3b2b9300b9455c3d15d370bf0c5903ab2b3c
Author: Murtadha Hubail <[email protected]>
AuthorDate: Wed Mar 6 11:32:25 2024 +0300

    [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]>
---
 .../org/apache/asterix/api/http/server/NCQueryServiceServlet.java    | 2 +-
 .../java/org/apache/asterix/api/http/server/QueryServiceServlet.java | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

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 1809166b5b..65d4734ee2 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 @@ public class NCQueryServiceServlet extends 
QueryServiceServlet {
                     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 61591f45ce..165cc75180 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 @@ public class QueryServiceServlet extends 
AbstractQueryApiServlet {
     }
 
     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 @@ public class QueryServiceServlet extends 
AbstractQueryApiServlet {
         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,

Reply via email to