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.List; | |
10 | import java.util.stream.Collectors; | |
11 | import lombok.AllArgsConstructor; | |
12 | import lombok.EqualsAndHashCode; | |
13 | import lombok.Getter; | |
14 | import org.opensearch.sql.ast.AbstractNodeVisitor; | |
15 | ||
16 | /** | |
17 | * Expression node that includes a list of RelevanceField nodes. | |
18 | */ | |
19 | @EqualsAndHashCode(callSuper = false) | |
20 | @AllArgsConstructor | |
21 | public class RelevanceFieldList extends UnresolvedExpression { | |
22 | @Getter | |
23 | private java.util.Map<String, Float> fieldList; | |
24 | ||
25 | @Override | |
26 | public List<UnresolvedExpression> getChild() { | |
27 | return List.of(); | |
28 | } | |
29 | ||
30 | @Override | |
31 | public <R, C> R accept(AbstractNodeVisitor<R, C> nodeVisitor, C context) { | |
32 |
1
1. accept : replaced return value with null for org/opensearch/sql/ast/expression/RelevanceFieldList::accept → KILLED |
return nodeVisitor.visitRelevanceFieldList(this, context); |
33 | } | |
34 | ||
35 | @Override | |
36 | public String toString() { | |
37 |
1
1. toString : replaced return value with "" for org/opensearch/sql/ast/expression/RelevanceFieldList::toString → NO_COVERAGE |
return fieldList |
38 | .entrySet() | |
39 | .stream() | |
40 |
1
1. lambda$toString$0 : replaced return value with "" for org/opensearch/sql/ast/expression/RelevanceFieldList::lambda$toString$0 → NO_COVERAGE |
.map(e -> String.format("\"%s\" ^ %s", e.getKey(), e.getValue())) |
41 | .collect(Collectors.joining(", ")); | |
42 | } | |
43 | } | |
Mutations | ||
32 |
1.1 |
|
37 |
1.1 |
|
40 |
1.1 |