Skip to content

Commit 83a1a96

Browse files
Fix output
1 parent 82e48f4 commit 83a1a96

File tree

1 file changed

+9
-1
lines changed
  • x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/logical

1 file changed

+9
-1
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/logical/Explain.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@
1010
import org.elasticsearch.common.io.stream.StreamOutput;
1111
import org.elasticsearch.xpack.esql.capabilities.TelemetryAware;
1212
import org.elasticsearch.xpack.esql.core.expression.Attribute;
13+
import org.elasticsearch.xpack.esql.core.expression.ReferenceAttribute;
1314
import org.elasticsearch.xpack.esql.core.tree.NodeInfo;
1415
import org.elasticsearch.xpack.esql.core.tree.Source;
16+
import org.elasticsearch.xpack.esql.core.type.DataType;
1517

1618
import java.util.List;
1719
import java.util.Objects;
@@ -25,6 +27,12 @@ public enum Type {
2527

2628
private final LogicalPlan query;
2729

30+
private final List<Attribute> output = List.of(
31+
new ReferenceAttribute(Source.EMPTY, "role", DataType.KEYWORD),
32+
new ReferenceAttribute(Source.EMPTY, "type", DataType.KEYWORD),
33+
new ReferenceAttribute(Source.EMPTY, "plan", DataType.KEYWORD)
34+
);
35+
2836
public Explain(Source source, LogicalPlan query) {
2937
super(source);
3038
this.query = query;
@@ -46,7 +54,7 @@ public LogicalPlan query() {
4654

4755
@Override
4856
public List<Attribute> output() {
49-
throw new UnsupportedOperationException();
57+
return output;
5058
}
5159

5260
@Override

0 commit comments

Comments
 (0)