Limit.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.ToString;
15
import org.opensearch.sql.ast.AbstractNodeVisitor;
16
17
@RequiredArgsConstructor
18
@Getter
19
@ToString
20
@EqualsAndHashCode
21
public class Limit extends UnresolvedPlan {
22
  private UnresolvedPlan child;
23
  private final Integer limit;
24
  private final Integer offset;
25
26
  @Override
27
  public Limit attach(UnresolvedPlan child) {
28
    this.child = child;
29 1 1. attach : replaced return value with null for org/opensearch/sql/ast/tree/Limit::attach → KILLED
    return this;
30
  }
31
32
  @Override
33
  public List<UnresolvedPlan> getChild() {
34 1 1. getChild : replaced return value with Collections.emptyList for org/opensearch/sql/ast/tree/Limit::getChild → KILLED
    return ImmutableList.of(this.child);
35
  }
36
37
  @Override
38
  public <T, C> T accept(AbstractNodeVisitor<T, C> visitor, C context) {
39 1 1. accept : replaced return value with null for org/opensearch/sql/ast/tree/Limit::accept → KILLED
    return visitor.visitLimit(this, context);
40
  }
41
42
}

Mutations

29

1.1
Location : attach
Killed by : org.opensearch.sql.analysis.AnalyzerTest.[engine:junit-jupiter]/[class:org.opensearch.sql.analysis.AnalyzerTest]/[method:limit_offset()]
replaced return value with null for org/opensearch/sql/ast/tree/Limit::attach → KILLED

34

1.1
Location : getChild
Killed by : org.opensearch.sql.analysis.AnalyzerTest.[engine:junit-jupiter]/[class:org.opensearch.sql.analysis.AnalyzerTest]/[method:limit_offset()]
replaced return value with Collections.emptyList for org/opensearch/sql/ast/tree/Limit::getChild → KILLED

39

1.1
Location : accept
Killed by : org.opensearch.sql.analysis.AnalyzerTest.[engine:junit-jupiter]/[class:org.opensearch.sql.analysis.AnalyzerTest]/[method:limit_offset()]
replaced return value with null for org/opensearch/sql/ast/tree/Limit::accept → KILLED

Active mutators

Tests examined


Report generated by PIT 1.9.0