Skip to content

Commit c4558ec

Browse files
authored
ESQL: Add docs to some Unresolved (elastic#131780)
Adds docs to `UnresolvedAttribute` and `UnresolvedFunction` explaining that we build them from tree-walking and resolve them at analyze time.
1 parent 0713b58 commit c4558ec

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,16 @@
1919
import java.util.List;
2020
import java.util.Objects;
2121

22-
// unfortunately we can't use UnresolvedNamedExpression
22+
/**
23+
* An unresolved attribute. We build these while walking the syntax
24+
* tree and then resolve them into other {@link Attribute} subclasses during
25+
* analysis.
26+
* <p>
27+
* For example, if they reference the data directly from lucene they'll be
28+
* {@link FieldAttribute}s. If they reference the results of another calculation
29+
* they will be {@link ReferenceAttribute}s.
30+
* </p>
31+
*/
2332
public class UnresolvedAttribute extends Attribute implements Unresolvable {
2433
private final boolean customMessage;
2534
private final String unresolvedMsg;

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
package org.elasticsearch.xpack.esql.expression.function;
88

99
import org.elasticsearch.common.io.stream.StreamOutput;
10+
import org.elasticsearch.xpack.esql.analysis.Analyzer;
1011
import org.elasticsearch.xpack.esql.core.capabilities.Unresolvable;
1112
import org.elasticsearch.xpack.esql.core.capabilities.UnresolvedException;
1213
import org.elasticsearch.xpack.esql.core.expression.Expression;
@@ -24,6 +25,11 @@
2425
import java.util.Objects;
2526
import java.util.Set;
2627

28+
/**
29+
* An unresolved function call. We build these while walking the syntax
30+
* tree and then resolve them into other {@link Function} subclasses during
31+
* {@link Analyzer analysis}.
32+
*/
2733
public class UnresolvedFunction extends Function implements Unresolvable {
2834

2935
private final String name;

0 commit comments

Comments
 (0)