1 | /* | |
2 | * Copyright OpenSearch Contributors | |
3 | * SPDX-License-Identifier: Apache-2.0 | |
4 | */ | |
5 | ||
6 | ||
7 | package org.opensearch.sql.ast.tree; | |
8 | ||
9 | import com.google.common.collect.ImmutableList; | |
10 | import java.util.List; | |
11 | import lombok.EqualsAndHashCode; | |
12 | import lombok.Getter; | |
13 | import lombok.ToString; | |
14 | import org.opensearch.sql.ast.AbstractNodeVisitor; | |
15 | import org.opensearch.sql.ast.expression.UnresolvedExpression; | |
16 | ||
17 | /** | |
18 | * Logical plan node of Filter, the interface for building filters in queries. | |
19 | */ | |
20 | @ToString | |
21 | @EqualsAndHashCode(callSuper = false) | |
22 | @Getter | |
23 | public class Filter extends UnresolvedPlan { | |
24 | private UnresolvedExpression condition; | |
25 | private UnresolvedPlan child; | |
26 | ||
27 | public Filter(UnresolvedExpression condition) { | |
28 | this.condition = condition; | |
29 | } | |
30 | ||
31 | @Override | |
32 | public Filter attach(UnresolvedPlan child) { | |
33 | this.child = child; | |
34 |
1
1. attach : replaced return value with null for org/opensearch/sql/ast/tree/Filter::attach → KILLED |
return this; |
35 | } | |
36 | ||
37 | @Override | |
38 | public List<UnresolvedPlan> getChild() { | |
39 |
1
1. getChild : replaced return value with Collections.emptyList for org/opensearch/sql/ast/tree/Filter::getChild → KILLED |
return ImmutableList.of(child); |
40 | } | |
41 | ||
42 | @Override | |
43 | public <T, C> T accept(AbstractNodeVisitor<T, C> nodeVisitor, C context) { | |
44 |
1
1. accept : replaced return value with null for org/opensearch/sql/ast/tree/Filter::accept → KILLED |
return nodeVisitor.visitFilter(this, context); |
45 | } | |
46 | } | |
Mutations | ||
34 |
1.1 |
|
39 |
1.1 |
|
44 |
1.1 |