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 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 | ||
17 | /** | |
18 | * Expression node, representing the syntax that is not resolved to | |
19 | * any other expression nodes yet but non-negligible | |
20 | * This expression is often created as the index name, field name etc. | |
21 | */ | |
22 | @ToString | |
23 | @EqualsAndHashCode(callSuper = false) | |
24 | @RequiredArgsConstructor | |
25 | @Getter | |
26 | public class UnresolvedAttribute extends UnresolvedExpression { | |
27 | private final String attr; | |
28 | ||
29 | @Override | |
30 | public List<UnresolvedExpression> getChild() { | |
31 |
1
1. getChild : replaced return value with Collections.emptyList for org/opensearch/sql/ast/expression/UnresolvedAttribute::getChild → NO_COVERAGE |
return ImmutableList.of(); |
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/UnresolvedAttribute::accept → KILLED |
return nodeVisitor.visitUnresolvedAttribute(this, context); |
37 | } | |
38 | } | |
Mutations | ||
31 |
1.1 |
|
36 |
1.1 |