Skip to content

Commit f380d37

Browse files
committed
remove unnecessary serialization
1 parent 033a76a commit f380d37

File tree

1 file changed

+2
-20
lines changed
  • x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/physical

1 file changed

+2
-20
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/physical/MergeExec.java

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@
77

88
package org.elasticsearch.xpack.esql.plan.physical;
99

10-
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
11-
import org.elasticsearch.common.io.stream.StreamInput;
1210
import org.elasticsearch.common.io.stream.StreamOutput;
1311
import org.elasticsearch.xpack.esql.core.expression.Attribute;
1412
import org.elasticsearch.xpack.esql.core.tree.NodeInfo;
1513
import org.elasticsearch.xpack.esql.core.tree.Source;
16-
import org.elasticsearch.xpack.esql.io.stream.PlanStreamInput;
1714
import org.elasticsearch.xpack.esql.plan.logical.local.LocalSupplier;
1815

1916
import java.io.IOException;
@@ -22,12 +19,6 @@
2219

2320
public class MergeExec extends LeafExec {
2421

25-
public static final NamedWriteableRegistry.Entry ENTRY = new NamedWriteableRegistry.Entry(
26-
PhysicalPlan.class,
27-
"MergeExec",
28-
MergeExec::new
29-
);
30-
3122
private final List<? extends PhysicalPlan> physSubPlans;
3223
private final List<Attribute> output;
3324

@@ -37,13 +28,6 @@ public MergeExec(Source source, List<? extends PhysicalPlan> physSubPlans, List<
3728
this.output = output;
3829
}
3930

40-
public MergeExec(StreamInput in) throws IOException {
41-
super(Source.readFrom((PlanStreamInput) in));
42-
this.physSubPlans = null; // in.readCollectionAsList(PhysicalPlan::new);
43-
// this.right = in.readNamedWriteable(PhysicalPlan.class);
44-
this.output = in.readNamedWriteableCollectionAsList(Attribute.class);
45-
}
46-
4731
public List<LocalSupplier> suppliers() {
4832
return physSubPlans.stream()
4933
.filter(p -> LocalSourceExec.class.isAssignableFrom(p.getClass()))
@@ -54,14 +38,12 @@ public List<LocalSupplier> suppliers() {
5438

5539
@Override
5640
public String getWriteableName() {
57-
return ENTRY.name;
41+
throw new UnsupportedOperationException("not serialized");
5842
}
5943

6044
@Override
6145
public void writeTo(StreamOutput out) throws IOException {
62-
Source.EMPTY.writeTo(out);
63-
out.writeCollection(physSubPlans);
64-
out.writeNamedWriteableCollection(output);
46+
throw new UnsupportedOperationException("not serialized");
6547
}
6648

6749
@Override

0 commit comments

Comments
 (0)