TableFunction.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
import org.opensearch.sql.ast.expression.QualifiedName;
19
import org.opensearch.sql.ast.expression.UnresolvedExpression;
20
21
/**
22
 * ASTNode for Table Function.
23
 */
24
@ToString
25
@EqualsAndHashCode(callSuper = false)
26
@RequiredArgsConstructor
27
public class TableFunction extends UnresolvedPlan {
28
29
  private final UnresolvedExpression functionName;
30
31
  @Getter
32
  private final List<UnresolvedExpression> arguments;
33
34
  public QualifiedName getFunctionName() {
35 1 1. getFunctionName : replaced return value with null for org/opensearch/sql/ast/tree/TableFunction::getFunctionName → KILLED
    return (QualifiedName) functionName;
36
  }
37
38
  @Override
39
  public List<UnresolvedPlan> getChild() {
40 1 1. getChild : replaced return value with Collections.emptyList for org/opensearch/sql/ast/tree/TableFunction::getChild → NO_COVERAGE
    return ImmutableList.of();
41
  }
42
43
  @Override
44
  public <T, C> T accept(AbstractNodeVisitor<T, C> nodeVisitor, C context) {
45 1 1. accept : replaced return value with null for org/opensearch/sql/ast/tree/TableFunction::accept → KILLED
    return nodeVisitor.visitTableFunction(this, context);
46
  }
47
48
  @Override
49
  public UnresolvedPlan attach(UnresolvedPlan child) {
50
    return null;
51
  }
52
}

Mutations

35

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

40

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

45

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

Active mutators

Tests examined


Report generated by PIT 1.9.0