Skip to content

Commit a68eb40

Browse files
committed
Remove empty attribute
1 parent 527d2a2 commit a68eb40

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/NamedExpressions.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
import org.elasticsearch.common.util.Maps;
1111
import org.elasticsearch.xpack.esql.core.expression.Attribute;
12+
import org.elasticsearch.xpack.esql.core.expression.EmptyAttribute;
1213
import org.elasticsearch.xpack.esql.core.expression.Expressions;
1314
import org.elasticsearch.xpack.esql.core.expression.NamedExpression;
1415

@@ -49,7 +50,7 @@ public static List<NamedExpression> mergeOutputExpressions(
4950
}
5051
List<NamedExpression> output = new ArrayList<>(childOutput.size() + fields.size());
5152
for (NamedExpression childAttr : childOutput) {
52-
if (lastPositions.containsKey(childAttr.name()) == false) {
53+
if ((childAttr instanceof EmptyAttribute) == false && lastPositions.containsKey(childAttr.name()) == false) {
5354
output.add(childAttr);
5455
}
5556
}

0 commit comments

Comments
 (0)