Skip to content

Commit d570b49

Browse files
committed
Expand javadoc on NodeInfo
Move the javadoc from Node#info onto NodeInfo and make it clearer what it's used for.
1 parent 81b4cce commit d570b49

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

x-pack/plugin/esql-core/src/main/java/org/elasticsearch/xpack/esql/core/tree/Node.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -307,16 +307,7 @@ protected final <E> T transformNodeProps(Class<E> typeToken, Function<? super E,
307307
}
308308

309309
/**
310-
* Return the information about this node.
311-
* <p>
312310
* Normally, you want to use one of the static {@code create} methods to implement this.
313-
* <p>
314-
* For {@code QueryPlan}s, it is very important that
315-
* the properties contain all of the expressions and references relevant to this node, and
316-
* that all of the properties are used in the provided constructor; otherwise query plan
317-
* transformations like
318-
* {@code QueryPlan#transformExpressionsOnly(Function)}
319-
* will not have an effect.
320311
*/
321312
protected abstract NodeInfo<? extends T> info();
322313

x-pack/plugin/esql-core/src/main/java/org/elasticsearch/xpack/esql/core/tree/NodeInfo.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,16 @@
1616
import static java.util.Collections.unmodifiableList;
1717

1818
/**
19-
* Information about a {@link Node}.
19+
* All the information about a {@link Node} that is needed to recreate or modify it.
20+
* <p>
21+
* Allows us to perform traversals and transformations of query plans and expressions without resorting to reflection.
22+
* <p>
23+
* For {@code QueryPlan}s, it is very important that
24+
* the properties contain all of the expressions and references relevant to this node, and
25+
* that all the properties are used in the provided constructor; otherwise query plan
26+
* transformations like
27+
* {@code QueryPlan#transformExpressionsOnly(Function)}
28+
* will not have an effect.
2029
* <p>
2130
* All the uses of this are fairly non-OO and we're looking
2231
* for ways to use this less and less.

0 commit comments

Comments
 (0)