Table.java

1
/*
2
 * Copyright OpenSearch Contributors
3
 * SPDX-License-Identifier: Apache-2.0
4
 */
5
6
7
package org.opensearch.sql.storage;
8
9
import java.util.Map;
10
import org.opensearch.sql.data.type.ExprType;
11
import org.opensearch.sql.planner.logical.LogicalPlan;
12
import org.opensearch.sql.planner.physical.PhysicalPlan;
13
14
/**
15
 * Table.
16
 */
17
public interface Table {
18
19
  /**
20
   * Get the {@link ExprType} for each field in the table.
21
   */
22
  Map<String, ExprType> getFieldTypes();
23
24
  /**
25
   * Implement a {@link LogicalPlan} by {@link PhysicalPlan} in storage engine.
26
   *
27
   * @param plan logical plan
28
   * @return physical plan
29
   */
30
  PhysicalPlan implement(LogicalPlan plan);
31
32
  /**
33
   * Optimize the {@link LogicalPlan} by storage engine rule.
34
   * The default optimize solution is no optimization.
35
   *
36
   * @param plan logical plan.
37
   * @return logical plan.
38
   */
39
  default LogicalPlan optimize(LogicalPlan plan) {
40 1 1. optimize : replaced return value with null for org/opensearch/sql/storage/Table::optimize → KILLED
    return plan;
41
  }
42
43
}

Mutations

40

1.1
Location : optimize
Killed by : org.opensearch.sql.planner.PlannerTest.[engine:junit-jupiter]/[class:org.opensearch.sql.planner.PlannerTest]/[method:planner_test()]
replaced return value with null for org/opensearch/sql/storage/Table::optimize → KILLED

Active mutators

Tests examined


Report generated by PIT 1.9.0