File tree Expand file tree Collapse file tree 4 files changed +11
-10
lines changed
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql Expand file tree Collapse file tree 4 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -375,6 +375,9 @@ public Profile(StreamInput in) throws IOException {
375375 @ Override
376376 public void writeTo (StreamOutput out ) throws IOException {
377377 out .writeCollection (drivers );
378+ if (out .getTransportVersion ().onOrAfter (TransportVersions .ESQL_PLANNER_PROFILE )) {
379+ out .writeCollection (plannerProfile );
380+ }
378381 }
379382
380383 @ Override
Original file line number Diff line number Diff line change 2222 */
2323public class PlannerProfile implements Writeable , ChunkedToXContentObject {
2424
25- public static final PlannerProfile EMPTY = new PlannerProfile ();
25+ public static final PlannerProfile EMPTY = new PlannerProfile (false );
2626
2727 private final boolean isLocalPlanning ;
2828
2929 public static PlannerProfile readFrom (StreamInput in ) throws IOException {
30- // NOCOMMIT
31- throw new UnsupportedOperationException ( );
30+ boolean isLocalPlanning = in . readBoolean ();
31+ return new PlannerProfile ( isLocalPlanning );
3232 }
3333
34- public PlannerProfile () {
35- // NOCOMMIT
36- throw new UnsupportedOperationException ();
34+ public PlannerProfile (boolean isLocalPlanning ) {
35+ this .isLocalPlanning = isLocalPlanning ;
3736 }
3837
3938 @ Override
4039 public void writeTo (StreamOutput out ) throws IOException {
41- // NOCOMMIT
42- throw new UnsupportedOperationException ();
40+ out .writeBoolean (isLocalPlanning );
4341 }
4442
4543 @ Override
Original file line number Diff line number Diff line change @@ -369,7 +369,7 @@ public SourceProvider createSourceProvider() {
369369 );
370370 }
371371 final List <Driver > drivers ;
372- final PlannerProfile localPlannerProfile = new PlannerProfile ();
372+ final PlannerProfile localPlannerProfile = new PlannerProfile (true );
373373 try {
374374 LocalExecutionPlanner planner = new LocalExecutionPlanner (
375375 context .sessionId (),
Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ public EsqlSession(
148148 this .logicalPlanOptimizer = logicalPlanOptimizer ;
149149 this .physicalPlanOptimizer = new PhysicalPlanOptimizer (new PhysicalOptimizerContext (configuration ));
150150 this .planTelemetry = planTelemetry ;
151- this .plannerProfile = new PlannerProfile ();
151+ this .plannerProfile = new PlannerProfile (false );
152152 this .indicesExpressionGrouper = indicesExpressionGrouper ;
153153 this .preMapper = new PreMapper (services );
154154 }
You can’t perform that action at this time.
0 commit comments