Eval.java

1
/*
2
 * Copyright OpenSearch Contributors
3
 * SPDX-License-Identifier: Apache-2.0
4
 */
5
6
7
package org.opensearch.sql.ast.tree;
8
9
import com.google.common.collect.ImmutableList;
10
import java.util.List;
11
import lombok.EqualsAndHashCode;
12
import lombok.Getter;
13
import lombok.RequiredArgsConstructor;
14
import lombok.Setter;
15
import lombok.ToString;
16
import org.opensearch.sql.ast.AbstractNodeVisitor;
17
import org.opensearch.sql.ast.expression.Let;
18
19
/**
20
 * AST node represent Eval operation.
21
 */
22
@Getter
23
@Setter
24
@ToString
25
@EqualsAndHashCode(callSuper = false)
26
@RequiredArgsConstructor
27
public class Eval extends UnresolvedPlan {
28
  private final List<Let> expressionList;
29
  private UnresolvedPlan child;
30
31
  @Override
32
  public Eval attach(UnresolvedPlan child) {
33
    this.child = child;
34 1 1. attach : replaced return value with null for org/opensearch/sql/ast/tree/Eval::attach → KILLED
    return this;
35
  }
36
37
  @Override
38
  public List<UnresolvedPlan> getChild() {
39 1 1. getChild : replaced return value with Collections.emptyList for org/opensearch/sql/ast/tree/Eval::getChild → KILLED
    return ImmutableList.of(this.child);
40
  }
41
42
  @Override
43
  public <T, C> T accept(AbstractNodeVisitor<T, C> nodeVisitor, C context) {
44 1 1. accept : replaced return value with null for org/opensearch/sql/ast/tree/Eval::accept → KILLED
    return nodeVisitor.visitEval(this, context);
45
  }
46
}

Mutations

34

1.1
Location : attach
Killed by : org.opensearch.sql.planner.logical.LogicalEvalTest.[engine:junit-jupiter]/[class:org.opensearch.sql.planner.logical.LogicalEvalTest]/[method:analyze_eval_with_one_field()]
replaced return value with null for org/opensearch/sql/ast/tree/Eval::attach → KILLED

39

1.1
Location : getChild
Killed by : org.opensearch.sql.planner.logical.LogicalEvalTest.[engine:junit-jupiter]/[class:org.opensearch.sql.planner.logical.LogicalEvalTest]/[method:analyze_eval_with_one_field()]
replaced return value with Collections.emptyList for org/opensearch/sql/ast/tree/Eval::getChild → KILLED

44

1.1
Location : accept
Killed by : org.opensearch.sql.planner.logical.LogicalEvalTest.[engine:junit-jupiter]/[class:org.opensearch.sql.planner.logical.LogicalEvalTest]/[method:analyze_eval_with_one_field()]
replaced return value with null for org/opensearch/sql/ast/tree/Eval::accept → KILLED

Active mutators

Tests examined


Report generated by PIT 1.9.0