1 | /* | |
2 | * Copyright OpenSearch Contributors | |
3 | * SPDX-License-Identifier: Apache-2.0 | |
4 | */ | |
5 | ||
6 | ||
7 | package org.opensearch.sql.expression; | |
8 | ||
9 | import lombok.EqualsAndHashCode; | |
10 | import lombok.RequiredArgsConstructor; | |
11 | import org.opensearch.sql.data.model.ExprValue; | |
12 | import org.opensearch.sql.data.type.ExprType; | |
13 | import org.opensearch.sql.expression.env.Environment; | |
14 | ||
15 | /** | |
16 | * Literal Expression. | |
17 | */ | |
18 | @EqualsAndHashCode | |
19 | @RequiredArgsConstructor | |
20 | public class LiteralExpression implements Expression { | |
21 | private final ExprValue exprValue; | |
22 | ||
23 | @Override | |
24 | public ExprValue valueOf(Environment<Expression, ExprValue> env) { | |
25 |
1
1. valueOf : replaced return value with null for org/opensearch/sql/expression/LiteralExpression::valueOf → KILLED |
return exprValue; |
26 | } | |
27 | ||
28 | @Override | |
29 | public ExprType type() { | |
30 |
1
1. type : replaced return value with null for org/opensearch/sql/expression/LiteralExpression::type → KILLED |
return exprValue.type(); |
31 | } | |
32 | ||
33 | @Override | |
34 | public <T, C> T accept(ExpressionNodeVisitor<T, C> visitor, C context) { | |
35 |
1
1. accept : replaced return value with null for org/opensearch/sql/expression/LiteralExpression::accept → KILLED |
return visitor.visitLiteral(this, context); |
36 | } | |
37 | ||
38 | @Override | |
39 | public String toString() { | |
40 |
1
1. toString : replaced return value with "" for org/opensearch/sql/expression/LiteralExpression::toString → KILLED |
return exprValue.toString(); |
41 | } | |
42 | } | |
Mutations | ||
25 |
1.1 |
|
30 |
1.1 |
|
35 |
1.1 |
|
40 |
1.1 |