>From Shahrzad Shirazi <[email protected]>:

Shahrzad Shirazi has submitted this change. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20004 )

 (

9 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted 
one.
 )Change subject: [NO ISSUE][COMP] Change plan to show RETAIN-UNTRUE for null 
placeholders
......................................................................

[NO ISSUE][COMP] Change plan to show RETAIN-UNTRUE for null placeholders

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
Change query plan to show RETAIN-UNTRUE when retaining
missing even if the placeholder parameter is null.

Ext-ref: MB-67347

Change-Id: I4a3af98be2cf74e837222755abfd45a075b3b257
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20004
Tested-by: Ali Alsuliman <[email protected]>
Reviewed-by: Ali Alsuliman <[email protected]>
---
M 
hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/prettyprint/LogicalOperatorPrettyPrintVisitorJson.java
M 
hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/prettyprint/LogicalOperatorPrettyPrintVisitor.java
2 files changed, 32 insertions(+), 2 deletions(-)

Approvals:
  Ali Alsuliman: Looks good to me, approved; Verified




diff --git 
a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/prettyprint/LogicalOperatorPrettyPrintVisitor.java
 
b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/prettyprint/LogicalOperatorPrettyPrintVisitor.java
index f904c56..e113642 100644
--- 
a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/prettyprint/LogicalOperatorPrettyPrintVisitor.java
+++ 
b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/prettyprint/LogicalOperatorPrettyPrintVisitor.java
@@ -300,9 +300,9 @@

     @Override
     public Void visitSelectOperator(SelectOperator op, Integer indent) throws 
AlgebricksException {
-        String retainMissing = op.getMissingPlaceholderVariable() != null
+        String retainMissing = (op.getMissingPlaceholderVariable() != null)
                 ? " retain-untrue (" + op.getMissingPlaceholderVariable() + " 
<- " + op.getRetainMissingAsValue() + ")"
-                : "";
+                : (op.getRetainMissingAsValue() != null ? " retain-untrue" : 
"");
         addIndent(indent).append("select 
(").append(op.getCondition().getValue().accept(exprVisitor, indent))
                 .append(")").append(retainMissing)
                 .append(op.isProjectPushed() ? " project: " + 
str(op.getProjectVariables()) : "");
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 3ca1277..9344ae3 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
@@ -781,6 +781,14 @@
         try {
             jsonGenerator.writeStringField(OPERATOR_FIELD, "select");
             writeStringFieldExpression(CONDITION_FIELD, op.getCondition(), 
indent);
+            if (op.getRetainMissingAsValue() != null) {
+                LogicalVariable placeholderVar = 
op.getMissingPlaceholderVariable();
+                IAlgebricksConstantValue retainValue = 
op.getRetainMissingAsValue();
+                if (placeholderVar != null) {
+                    jsonGenerator.writeStringField("retain-untrue-variable", 
String.valueOf(placeholderVar));
+                }
+                jsonGenerator.writeStringField("retain-untrue-value", 
String.valueOf(retainValue));
+            }
             if (op.isProjectPushed()) {
                 writeArrayFieldOfVariables(PROJECT_VARIABLES_FIELD, 
op.getProjectVariables());
             }

--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20004
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: ionic
Gerrit-Change-Id: I4a3af98be2cf74e837222755abfd45a075b3b257
Gerrit-Change-Number: 20004
Gerrit-PatchSet: 11
Gerrit-Owner: Shahrzad Shirazi <[email protected]>
Gerrit-Reviewer: Ali Alsuliman <[email protected]>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Shahrzad Shirazi <[email protected]>
Gerrit-MessageType: merged

Reply via email to