HighlightFunction.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 java.util.List;
9
import java.util.Map;
10
import lombok.AllArgsConstructor;
11
import lombok.EqualsAndHashCode;
12
import lombok.Getter;
13
import lombok.ToString;
14
import org.opensearch.sql.ast.AbstractNodeVisitor;
15
16
/**
17
 * Expression node of Highlight function.
18
 */
19
@AllArgsConstructor
20
@EqualsAndHashCode(callSuper = false)
21
@Getter
22
@ToString
23
public class HighlightFunction extends UnresolvedExpression {
24
  private final UnresolvedExpression highlightField;
25
  private final Map<String, Literal> arguments;
26
27
  @Override
28
  public <T, C> T accept(AbstractNodeVisitor<T, C> nodeVisitor, C context) {
29 1 1. accept : replaced return value with null for org/opensearch/sql/ast/expression/HighlightFunction::accept → KILLED
    return nodeVisitor.visitHighlightFunction(this, context);
30
  }
31
32
  @Override
33
  public List<UnresolvedExpression> getChild() {
34 1 1. getChild : replaced return value with Collections.emptyList for org/opensearch/sql/ast/expression/HighlightFunction::getChild → NO_COVERAGE
    return List.of(highlightField);
35
  }
36
}

Mutations

29

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

34

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

Active mutators

Tests examined


Report generated by PIT 1.9.0