Skip to content

Commit d640819

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 d640819

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -307,13 +307,11 @@ 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.
313311
* <p>
314312
* For {@code QueryPlan}s, it is very important that
315313
* 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
314+
* that all the properties are used in the provided constructor; otherwise query plan
317315
* transformations like
318316
* {@code QueryPlan#transformExpressionsOnly(Function)}
319317
* will not have an effect.

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@
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, e.g. via
22+
* {@link Node#transformNodeProps(Class, Function)}, which is used e.g. in {@code QueryPlan#transformExpressionsDown}.
2023
* <p>
2124
* All the uses of this are fairly non-OO and we're looking
2225
* for ways to use this less and less.

0 commit comments

Comments
 (0)