diff --git a/ppl-spark-integration/src/main/java/org/opensearch/sql/ast/tree/AppendCol.java b/ppl-spark-integration/src/main/java/org/opensearch/sql/ast/tree/AppendCol.java index b98d08caa..421821739 100644 --- a/ppl-spark-integration/src/main/java/org/opensearch/sql/ast/tree/AppendCol.java +++ b/ppl-spark-integration/src/main/java/org/opensearch/sql/ast/tree/AppendCol.java @@ -26,9 +26,9 @@ @AllArgsConstructor public class AppendCol extends UnresolvedPlan { - public boolean override; + private final boolean override; - private UnresolvedPlan subSearch; + private final UnresolvedPlan subSearch; private UnresolvedPlan child; diff --git a/ppl-spark-integration/src/main/java/org/opensearch/sql/ppl/CatalystQueryPlanVisitor.java b/ppl-spark-integration/src/main/java/org/opensearch/sql/ppl/CatalystQueryPlanVisitor.java index c59194c3a..fba8cf4f2 100644 --- a/ppl-spark-integration/src/main/java/org/opensearch/sql/ppl/CatalystQueryPlanVisitor.java +++ b/ppl-spark-integration/src/main/java/org/opensearch/sql/ppl/CatalystQueryPlanVisitor.java @@ -296,7 +296,7 @@ public LogicalPlan visitAppendCol(AppendCol node, CatalystPlanContext context) { new Join.JoinHint()); // Remove the APPEND_ID and duplicated field on T1 if override option present. - if (node.override) { + if (node.isOverride()) { List attrToOverride = AppendColCatalystUtils.getOverridedList(subSearch, TABLE_LHS); if (attrToOverride != null && !attrToOverride.isEmpty() &&