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

Mutations

35

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

40

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

45

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

Active mutators

Tests examined


Report generated by PIT 1.9.0