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

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


The following commit(s) were added to refs/heads/master by this push:
     new dc3f31c  [ASTERIXDB-2635][*DB] Fix JSON plan pretty printing
dc3f31c is described below

commit dc3f31c3f9b4b3fb5ca48245beafa9dbc874fa98
Author: Ali Alsuliman <[email protected]>
AuthorDate: Tue Sep 24 18:46:59 2019 -0700

    [ASTERIXDB-2635][*DB] Fix JSON plan pretty printing
    
    - user model changes: no
    - storage format changes: no
    - interface changes: no
    
    Details:
    Follow up change to fix printing "expressions" field
    
    Change-Id: Ia994c0e0001cee2eca31f0bdf51ddb52320ae752
    Reviewed-on: https://asterix-gerrit.ics.uci.edu/3574
    Contrib: Jenkins <[email protected]>
    Tested-by: Jenkins <[email protected]>
    Integration-Tests: Jenkins <[email protected]>
    Reviewed-by: Ali Alsuliman <[email protected]>
    Reviewed-by: Murtadha Hubail <[email protected]>
---
 .../algebra/prettyprint/LogicalOperatorPrettyPrintVisitorJson.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/prettyprint/LogicalOperatorPrettyPrintVisitorJson.java
 
b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/prettyprint/LogicalOperatorPrettyPrintVisitorJson.java
index 6422302..21ea331 100644
--- 
a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/prettyprint/LogicalOperatorPrettyPrintVisitorJson.java
+++ 
b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/prettyprint/LogicalOperatorPrettyPrintVisitorJson.java
@@ -89,6 +89,7 @@ public class LogicalOperatorPrettyPrintVisitorJson extends 
AbstractLogicalOperat
     private static final DefaultIndenter OBJECT_INDENT = new DefaultIndenter(" 
  ", DefaultIndenter.SYS_LF);
     private static final String OPERATOR_FIELD = "operator";
     private static final String VARIABLES_FIELD = "variables";
+    // printing using the "expressions" field has to be an array of strings of 
the form ["str1", "str2", ...]
     private static final String EXPRESSIONS_FIELD = "expressions";
     private static final String EXPRESSION_FIELD = "expression";
     private static final String CONDITION_FIELD = "condition";
@@ -375,7 +376,7 @@ public class LogicalOperatorPrettyPrintVisitorJson extends 
AbstractLogicalOperat
     public Void visitSelectOperator(SelectOperator op, Void indent) throws 
AlgebricksException {
         try {
             jsonGenerator.writeStringField(OPERATOR_FIELD, "select");
-            writeStringFieldExpression(EXPRESSIONS_FIELD, op.getCondition(), 
indent);
+            writeStringFieldExpression(CONDITION_FIELD, op.getCondition(), 
indent);
             return null;
         } catch (IOException e) {
             throw new AlgebricksException(e, ErrorCode.ERROR_PRINTING_PLAN);

Reply via email to