Dedupe.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.AllArgsConstructor;
12
import lombok.EqualsAndHashCode;
13
import lombok.Getter;
14
import lombok.RequiredArgsConstructor;
15
import lombok.Setter;
16
import lombok.ToString;
17
import org.opensearch.sql.ast.AbstractNodeVisitor;
18
import org.opensearch.sql.ast.expression.Argument;
19
import org.opensearch.sql.ast.expression.Field;
20
21
/**
22
 * AST node represent Dedupe operation.
23
 */
24
@Getter
25
@Setter
26
@ToString
27
@EqualsAndHashCode(callSuper = false)
28
@RequiredArgsConstructor
29
@AllArgsConstructor
30
public class Dedupe extends UnresolvedPlan {
31
  private UnresolvedPlan child;
32
  private final List<Argument> options;
33
  private final List<Field> fields;
34
35
  @Override
36
  public Dedupe attach(UnresolvedPlan child) {
37
    this.child = child;
38 1 1. attach : replaced return value with null for org/opensearch/sql/ast/tree/Dedupe::attach → NO_COVERAGE
    return this;
39
  }
40
41
  @Override
42
  public List<UnresolvedPlan> getChild() {
43 1 1. getChild : replaced return value with Collections.emptyList for org/opensearch/sql/ast/tree/Dedupe::getChild → KILLED
    return ImmutableList.of(this.child);
44
  }
45
46
  @Override
47
  public <T, C> T accept(AbstractNodeVisitor<T, C> nodeVisitor, C context) {
48 1 1. accept : replaced return value with null for org/opensearch/sql/ast/tree/Dedupe::accept → KILLED
    return nodeVisitor.visitDedupe(this, context);
49
  }
50
}

Mutations

38

1.1
Location : attach
Killed by : none
replaced return value with null for org/opensearch/sql/ast/tree/Dedupe::attach → NO_COVERAGE

43

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

48

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

Active mutators

Tests examined


Report generated by PIT 1.9.0