Span.java

1
/*
2
 * Copyright OpenSearch Contributors
3
 * SPDX-License-Identifier: Apache-2.0
4
 */
5
6
package org.opensearch.sql.ast.expression;
7
8
import com.google.common.collect.ImmutableList;
9
import java.util.List;
10
import lombok.EqualsAndHashCode;
11
import lombok.Getter;
12
import lombok.RequiredArgsConstructor;
13
import lombok.ToString;
14
import org.opensearch.sql.ast.AbstractNodeVisitor;
15
16
/**
17
 * Span expression node.
18
 * Params include field expression and the span value.
19
 */
20
@Getter
21
@EqualsAndHashCode(callSuper = false)
22
@RequiredArgsConstructor
23
@ToString
24
public class Span extends UnresolvedExpression {
25
  private final UnresolvedExpression field;
26
  private final UnresolvedExpression value;
27
  private final SpanUnit unit;
28
29
  @Override
30
  public List<UnresolvedExpression> getChild() {
31 1 1. getChild : replaced return value with Collections.emptyList for org/opensearch/sql/ast/expression/Span::getChild → NO_COVERAGE
    return ImmutableList.of(field, value);
32
  }
33
34
  @Override
35
  public <R, C> R accept(AbstractNodeVisitor<R, C> nodeVisitor, C context) {
36 1 1. accept : replaced return value with null for org/opensearch/sql/ast/expression/Span::accept → KILLED
    return nodeVisitor.visitSpan(this, context);
37
  }
38
39
}

Mutations

31

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

36

1.1
Location : accept
Killed by : org.opensearch.sql.analysis.ExpressionAnalyzerTest.[engine:junit-jupiter]/[class:org.opensearch.sql.analysis.ExpressionAnalyzerTest]/[method:visit_span()]
replaced return value with null for org/opensearch/sql/ast/expression/Span::accept → KILLED

Active mutators

Tests examined


Report generated by PIT 1.9.0