PhysicalPlan.java

1
/*
2
 * Copyright OpenSearch Contributors
3
 * SPDX-License-Identifier: Apache-2.0
4
 */
5
6
7
package org.opensearch.sql.planner.physical;
8
9
import java.util.Iterator;
10
import org.opensearch.sql.data.model.ExprValue;
11
import org.opensearch.sql.executor.ExecutionEngine;
12
import org.opensearch.sql.planner.PlanNode;
13
14
/**
15
 * Physical plan.
16
 */
17
public abstract class PhysicalPlan implements PlanNode<PhysicalPlan>,
18
    Iterator<ExprValue>,
19
    AutoCloseable {
20
  /**
21
   * Accept the {@link PhysicalPlanNodeVisitor}.
22
   *
23
   * @param visitor visitor.
24
   * @param context visitor context.
25
   * @param <R>     returned object type.
26
   * @param <C>     context type.
27
   * @return returned object.
28
   */
29
  public abstract <R, C> R accept(PhysicalPlanNodeVisitor<R, C> visitor, C context);
30
31
  public void open() {
32 1 1. open : removed call to java/util/List::forEach → KILLED
    getChild().forEach(PhysicalPlan::open);
33
  }
34
35
  public void close() {
36 1 1. close : removed call to java/util/List::forEach → SURVIVED
    getChild().forEach(PhysicalPlan::close);
37
  }
38
39
  public ExecutionEngine.Schema schema() {
40
    throw new IllegalStateException(String.format("[BUG] schema can been only applied to "
41
        + "ProjectOperator, instead of %s", toString()));
42
  }
43
}

Mutations

32

1.1
Location : open
Killed by : org.opensearch.sql.planner.physical.RenameOperatorTest.[engine:junit-jupiter]/[class:org.opensearch.sql.planner.physical.RenameOperatorTest]/[method:avg_aggregation_rename()]
removed call to java/util/List::forEach → KILLED

36

1.1
Location : close
Killed by : none
removed call to java/util/List::forEach → SURVIVED

Active mutators

Tests examined


Report generated by PIT 1.9.0