Values.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
import org.opensearch.sql.ast.Node;
17
import org.opensearch.sql.ast.expression.Literal;
18
19
/**
20
 * AST node class for a sequence of literal values.
21
 */
22
@ToString
23
@Getter
24
@EqualsAndHashCode(callSuper = false)
25
@RequiredArgsConstructor
26
public class Values extends UnresolvedPlan {
27
28
  private final List<List<Literal>> values;
29
30
  @Override
31
  public UnresolvedPlan attach(UnresolvedPlan child) {
32
    throw new UnsupportedOperationException("Values node is supposed to have no child node");
33
  }
34
35
  @Override
36
  public <T, C> T accept(AbstractNodeVisitor<T, C> nodeVisitor, C context) {
37 1 1. accept : replaced return value with null for org/opensearch/sql/ast/tree/Values::accept → KILLED
    return nodeVisitor.visitValues(this, context);
38
  }
39
40
  @Override
41
  public List<? extends Node> getChild() {
42 1 1. getChild : replaced return value with Collections.emptyList for org/opensearch/sql/ast/tree/Values::getChild → NO_COVERAGE
    return ImmutableList.of();
43
  }
44
45
}

Mutations

37

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

42

1.1
Location : getChild
Killed by : none
replaced return value with Collections.emptyList for org/opensearch/sql/ast/tree/Values::getChild → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.9.0