From e494c5d228aebae3e3df0e75c1618e5c40881988 Mon Sep 17 00:00:00 2001 From: Heng Qian Date: Mon, 18 Nov 2024 17:53:06 +0800 Subject: [PATCH] Address comments Signed-off-by: Heng Qian --- .../src/main/java/org/opensearch/sql/ast/tree/Flatten.java | 2 +- .../java/org/opensearch/sql/ppl/CatalystQueryPlanVisitor.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ppl-spark-integration/src/main/java/org/opensearch/sql/ast/tree/Flatten.java b/ppl-spark-integration/src/main/java/org/opensearch/sql/ast/tree/Flatten.java index d6885b299..36c126591 100644 --- a/ppl-spark-integration/src/main/java/org/opensearch/sql/ast/tree/Flatten.java +++ b/ppl-spark-integration/src/main/java/org/opensearch/sql/ast/tree/Flatten.java @@ -17,7 +17,7 @@ public class Flatten extends UnresolvedPlan { @Getter private final Field field; @Getter - private final List aliases; + private final List aliasSequence; @Override public UnresolvedPlan attach(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 3ea1acb75..af94dd004 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 @@ -460,7 +460,7 @@ public LogicalPlan visitFlatten(Flatten flatten, CatalystPlanContext context) { context.getNamedParseExpressions().push(UnresolvedStar$.MODULE$.apply(Option.>empty())); } Expression field = visitExpression(flatten.getField(), context); - List alias = flatten.getAliases().stream() + List alias = flatten.getAliasSequence().stream() .map(aliasNode -> visitExpression(aliasNode, context)) .collect(Collectors.toList()); context.retainAllNamedParseExpressions(p -> (NamedExpression) p);