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 one-to-many mapping relation IN. | |
19 | * Params include the field expression and/or wildcard field expression, | |
20 | * nested field expression (@field). | |
21 | * And the values that the field is mapped to (@valueList). | |
22 | */ | |
23 | @Getter | |
24 | @ToString | |
25 | @EqualsAndHashCode(callSuper = false) | |
26 | @RequiredArgsConstructor | |
27 | public class In extends UnresolvedExpression { | |
28 | private final UnresolvedExpression field; | |
29 | private final List<UnresolvedExpression> valueList; | |
30 | ||
31 | @Override | |
32 | public List<UnresolvedExpression> getChild() { | |
33 |
1
1. getChild : replaced return value with Collections.emptyList for org/opensearch/sql/ast/expression/In::getChild → NO_COVERAGE |
return Arrays.asList(field); |
34 | } | |
35 | ||
36 | @Override | |
37 | public <R, C> R accept(AbstractNodeVisitor<R, C> nodeVisitor, C context) { | |
38 |
1
1. accept : replaced return value with null for org/opensearch/sql/ast/expression/In::accept → KILLED |
return nodeVisitor.visitIn(this, context); |
39 | } | |
40 | } | |
Mutations | ||
33 |
1.1 |
|
38 |
1.1 |