Skip to content

ES|QL: enable EXPLAIN (snapshot only) #129526

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Jun 23, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix output
  • Loading branch information
luigidellaquila committed Jun 20, 2025
commit 83a1a96c113fdd14f4f39744c6ddbe141aef711c
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.xpack.esql.capabilities.TelemetryAware;
import org.elasticsearch.xpack.esql.core.expression.Attribute;
import org.elasticsearch.xpack.esql.core.expression.ReferenceAttribute;
import org.elasticsearch.xpack.esql.core.tree.NodeInfo;
import org.elasticsearch.xpack.esql.core.tree.Source;
import org.elasticsearch.xpack.esql.core.type.DataType;

import java.util.List;
import java.util.Objects;
Expand All @@ -25,6 +27,12 @@ public enum Type {

private final LogicalPlan query;

private final List<Attribute> output = List.of(
new ReferenceAttribute(Source.EMPTY, "role", DataType.KEYWORD),
new ReferenceAttribute(Source.EMPTY, "type", DataType.KEYWORD),
new ReferenceAttribute(Source.EMPTY, "plan", DataType.KEYWORD)
);

public Explain(Source source, LogicalPlan query) {
super(source);
this.query = query;
Expand All @@ -46,7 +54,7 @@ public LogicalPlan query() {

@Override
public List<Attribute> output() {
throw new UnsupportedOperationException();
return output;
}

@Override
Expand Down