Not.java

1
/*
2
 * Copyright OpenSearch Contributors
3
 * SPDX-License-Identifier: Apache-2.0
4
 */
5
6
7
package org.opensearch.sql.ast.expression;
8
9
import java.util.Arrays;
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
17
/**
18
 * Expression node of the logic NOT.
19
 */
20
@Getter
21
@ToString
22
@EqualsAndHashCode(callSuper = false)
23
@RequiredArgsConstructor
24
public class Not extends UnresolvedExpression {
25
  private final UnresolvedExpression expression;
26
27
  @Override
28
  public List<UnresolvedExpression> getChild() {
29 1 1. getChild : replaced return value with Collections.emptyList for org/opensearch/sql/ast/expression/Not::getChild → NO_COVERAGE
    return Arrays.asList(expression);
30
  }
31
32
  @Override
33
  public <R, C> R accept(AbstractNodeVisitor<R, C> nodeVisitor, C context) {
34 1 1. accept : replaced return value with null for org/opensearch/sql/ast/expression/Not::accept → KILLED
    return nodeVisitor.visitNot(this, context);
35
  }
36
}

Mutations

29

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

34

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

Active mutators

Tests examined


Report generated by PIT 1.9.0