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.AllArgsConstructor; | |
12 | import lombok.EqualsAndHashCode; | |
13 | import lombok.Getter; | |
14 | import lombok.RequiredArgsConstructor; | |
15 | import lombok.Setter; | |
16 | import lombok.ToString; | |
17 | import org.opensearch.sql.ast.AbstractNodeVisitor; | |
18 | import org.opensearch.sql.ast.expression.Argument; | |
19 | import org.opensearch.sql.ast.expression.Field; | |
20 | ||
21 | /** | |
22 | * AST node represent Dedupe operation. | |
23 | */ | |
24 | @Getter | |
25 | @Setter | |
26 | @ToString | |
27 | @EqualsAndHashCode(callSuper = false) | |
28 | @RequiredArgsConstructor | |
29 | @AllArgsConstructor | |
30 | public class Dedupe extends UnresolvedPlan { | |
31 | private UnresolvedPlan child; | |
32 | private final List<Argument> options; | |
33 | private final List<Field> fields; | |
34 | ||
35 | @Override | |
36 | public Dedupe attach(UnresolvedPlan child) { | |
37 | this.child = child; | |
38 |
1
1. attach : replaced return value with null for org/opensearch/sql/ast/tree/Dedupe::attach → NO_COVERAGE |
return this; |
39 | } | |
40 | ||
41 | @Override | |
42 | public List<UnresolvedPlan> getChild() { | |
43 |
1
1. getChild : replaced return value with Collections.emptyList for org/opensearch/sql/ast/tree/Dedupe::getChild → KILLED |
return ImmutableList.of(this.child); |
44 | } | |
45 | ||
46 | @Override | |
47 | public <T, C> T accept(AbstractNodeVisitor<T, C> nodeVisitor, C context) { | |
48 |
1
1. accept : replaced return value with null for org/opensearch/sql/ast/tree/Dedupe::accept → KILLED |
return nodeVisitor.visitDedupe(this, context); |
49 | } | |
50 | } | |
Mutations | ||
38 |
1.1 |
|
43 |
1.1 |
|
48 |
1.1 |