Skip to content

Commit b24fec8

Browse files
committed
Do not use EmptyAttribute
1 parent 816884a commit b24fec8

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/LogicalVerifier.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public Failures verify(LogicalPlan plan) {
3939
});
4040

4141
if (dependencyFailures.hasFailures()) {
42-
// throw new IllegalStateException(dependencyFailures.toString());
42+
throw new IllegalStateException(dependencyFailures.toString());
4343
}
4444

4545
return failures;

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/PhysicalVerifier.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public Failures verify(PhysicalPlan plan) {
6666
});
6767

6868
if (depFailures.hasFailures()) {
69-
// throw new IllegalStateException(depFailures.toString());
69+
throw new IllegalStateException(depFailures.toString());
7070
}
7171

7272
return failures;

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/LogicalPlanBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ public PlanFactory visitChangePointCommand(EsqlBaseParser.ChangePointCommandCont
479479
Source src = source(ctx);
480480
Attribute value = visitQualifiedName(ctx.value);
481481
Attribute key = ctx.key == null ? new UnresolvedAttribute(src, "@timestamp") : visitQualifiedName(ctx.key);
482-
Attribute partitionField = ctx.partitionField == null ? new EmptyAttribute(src) : visitQualifiedName(ctx.partitionField);
482+
Attribute partitionField = visitQualifiedName(ctx.partitionField);
483483
Attribute targetType = new ReferenceAttribute(
484484
src,
485485
ctx.targetType == null ? "type" : visitQualifiedName(ctx.targetType).name(),

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/planner/LocalExecutionPlanner.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,7 @@ private PhysicalOperation planChangePoint(ChangePointExec changePoint, LocalExec
821821
return source.with(
822822
new ChangePointOperator.Factory(
823823
layout.get(changePoint.value().id()).channel(),
824-
changePoint.partitionField() instanceof EmptyAttribute == false ? Optional.of(layout.get(changePoint.partitionField().id()).channel()) : Optional.empty(),
824+
changePoint.partitionField() != null ? Optional.of(layout.get(changePoint.partitionField().id()).channel()) : Optional.empty(),
825825
changePoint.sourceText(),
826826
changePoint.sourceLocation().getLineNumber(),
827827
changePoint.sourceLocation().getColumnNumber()

0 commit comments

Comments
 (0)