LogicalEval.java

1
/*
2
 * Copyright OpenSearch Contributors
3
 * SPDX-License-Identifier: Apache-2.0
4
 */
5
6
7
package org.opensearch.sql.planner.logical;
8
9
import java.util.Collections;
10
import java.util.List;
11
import lombok.EqualsAndHashCode;
12
import lombok.Getter;
13
import lombok.ToString;
14
import org.apache.commons.lang3.tuple.Pair;
15
import org.opensearch.sql.expression.Expression;
16
import org.opensearch.sql.expression.ReferenceExpression;
17
18
/**
19
 * Logical Evaluation represent the evaluation operation. The {@link LogicalEval#expressions} is a
20
 * list assignment operation. e.g. velocity = distance/speed, then the Pair is (velocity,
21
 * distance/speed).
22
 */
23
@ToString
24
@EqualsAndHashCode(callSuper = true)
25
public class LogicalEval extends LogicalPlan {
26
27
  @Getter
28
  private final List<Pair<ReferenceExpression, Expression>> expressions;
29
30
  /**
31
   * Constructor of LogicalEval.
32
   */
33
  public LogicalEval(
34
      LogicalPlan child,
35
      List<Pair<ReferenceExpression, Expression>> expressions) {
36
    super(Collections.singletonList(child));
37
    this.expressions = expressions;
38
  }
39
40
  @Override
41
  public <R, C> R accept(LogicalPlanNodeVisitor<R, C> visitor, C context) {
42 1 1. accept : replaced return value with null for org/opensearch/sql/planner/logical/LogicalEval::accept → KILLED
    return visitor.visitEval(this, context);
43
  }
44
}

Mutations

42

1.1
Location : accept
Killed by : org.opensearch.sql.planner.DefaultImplementorTest.[engine:junit-jupiter]/[class:org.opensearch.sql.planner.DefaultImplementorTest]/[method:visitShouldReturnDefaultPhysicalOperator()]
replaced return value with null for org/opensearch/sql/planner/logical/LogicalEval::accept → KILLED

Active mutators

Tests examined


Report generated by PIT 1.9.0