Skip to content

Commit a8826cf

Browse files
committed
Use null instead of empty string as a default to nest path attribute
Signed-off-by: Yuanchun Shen <yuanchu@amazon.com>
1 parent 993f47e commit a8826cf

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

opensearch/src/main/java/org/opensearch/sql/opensearch/request/PredicateAnalyzer.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
import java.util.function.Predicate;
6262
import java.util.function.Supplier;
6363
import java.util.stream.Collectors;
64+
import javax.annotation.Nullable;
6465
import lombok.Getter;
6566
import lombok.RequiredArgsConstructor;
6667
import org.apache.calcite.plan.RelOptCluster;
@@ -1613,7 +1614,7 @@ public static final class NamedFieldExpression implements TerminalExpression {
16131614

16141615
private final String name;
16151616
private final ExprType type;
1616-
@Getter private final String nestedPath;
1617+
@Getter @Nullable private final String nestedPath;
16171618

16181619
public NamedFieldExpression(
16191620
int refIndex, List<String> schema, Map<String, ExprType> filedTypes) {
@@ -1623,7 +1624,7 @@ public NamedFieldExpression(
16231624
}
16241625

16251626
private NamedFieldExpression() {
1626-
this(null, null, "");
1627+
this(null, null, (String) null);
16271628
}
16281629

16291630
private NamedFieldExpression(
@@ -1635,7 +1636,7 @@ private NamedFieldExpression(
16351636
}
16361637

16371638
private NamedFieldExpression(RexLiteral literal) {
1638-
this(literal == null ? null : RexLiteral.stringValue(literal), null, "");
1639+
this(literal == null ? null : RexLiteral.stringValue(literal), null, null);
16391640
}
16401641

16411642
public String getRootName() {

0 commit comments

Comments
 (0)