Skip to content

Commit 4bfaaed

Browse files
committed
javadoc
1 parent f944fde commit 4bfaaed

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/operator/MergeOperator.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
import java.util.ListIterator;
1717
import java.util.function.Supplier;
1818

19+
/**
20+
* A merge operator is effectively a "fan-in" operator - accepts input
21+
* from several sources and provides it in a single output.
22+
*/
1923
public class MergeOperator extends SourceOperator {
2024

2125
private final BlockFactory blockFactory;
@@ -76,7 +80,7 @@ public Page getOutput() {
7680

7781
@Override
7882
public void close() {
79-
// The blocks are closable by the other exchange? so we have to copy them
83+
// release blocks from any subplan not fully consumed.
8084
if (subPlanBlocks != null) {
8185
while (subPlanBlocks.hasNext()) {
8286
Releasables.close(subPlanBlocks.next());

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
1111
import org.elasticsearch.common.io.stream.StreamInput;
1212
import org.elasticsearch.common.io.stream.StreamOutput;
13-
import org.elasticsearch.xpack.esql.core.expression.Attribute;
1413
import org.elasticsearch.xpack.esql.core.tree.NodeInfo;
1514
import org.elasticsearch.xpack.esql.core.tree.Source;
1615
import org.elasticsearch.xpack.esql.io.stream.PlanStreamInput;
@@ -19,10 +18,14 @@
1918
import java.util.List;
2019
import java.util.Objects;
2120

21+
/**
22+
* A Fork is a {@code Plan} with one child, but holds several logical subplans, e.g.
23+
* {@code FORK [WHERE content:"fox" ] [WHERE content:"dog"] }
24+
*/
2225
public class Fork extends UnaryPlan {
2326
public static final NamedWriteableRegistry.Entry ENTRY = new NamedWriteableRegistry.Entry(LogicalPlan.class, "Fork", Fork::new);
27+
2428
private final List<LogicalPlan> subPlans;
25-
private List<Attribute> lazyOutput;
2629

2730
public Fork(Source source, LogicalPlan child, List<LogicalPlan> subPlans) {
2831
super(source, child);

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,13 @@
1919
import java.util.List;
2020
import java.util.Objects;
2121

22+
/**
23+
* A Merge is a {@code LeafPlan}, which holds several logical subplans.
24+
*/
2225
public class Merge extends LeafPlan {
26+
2327
public static final NamedWriteableRegistry.Entry ENTRY = new NamedWriteableRegistry.Entry(LogicalPlan.class, "Merge", Merge::new);
28+
2429
private final List<LogicalPlan> subPlans;
2530

2631
public Merge(Source source, List<LogicalPlan> subPlans) {

0 commit comments

Comments
 (0)