1
|
|
/* |
2
|
|
* Copyright OpenSearch Contributors |
3
|
|
* SPDX-License-Identifier: Apache-2.0 |
4
|
|
*/ |
5
|
|
|
6
|
|
|
7
|
|
package org.opensearch.sql.data.model; |
8
|
|
|
9
|
|
import com.google.common.base.Objects; |
10
|
|
import lombok.RequiredArgsConstructor; |
11
|
|
|
12
|
|
/** |
13
|
|
* Expression Number Value. |
14
|
|
*/ |
15
|
|
@RequiredArgsConstructor |
16
|
|
public abstract class AbstractExprNumberValue extends AbstractExprValue { |
17
|
|
private final Number value; |
18
|
|
|
19
|
|
@Override |
20
|
|
public boolean isNumber() { |
21
|
1
1. isNumber : replaced boolean return with false for org/opensearch/sql/data/model/AbstractExprNumberValue::isNumber → KILLED
|
return true; |
22
|
|
} |
23
|
|
|
24
|
|
@Override |
25
|
|
public Byte byteValue() { |
26
|
1
1. byteValue : replaced return value with null for org/opensearch/sql/data/model/AbstractExprNumberValue::byteValue → KILLED
|
return value.byteValue(); |
27
|
|
} |
28
|
|
|
29
|
|
@Override |
30
|
|
public Short shortValue() { |
31
|
1
1. shortValue : replaced Short return value with 0 for org/opensearch/sql/data/model/AbstractExprNumberValue::shortValue → KILLED
|
return value.shortValue(); |
32
|
|
} |
33
|
|
|
34
|
|
@Override |
35
|
|
public Integer integerValue() { |
36
|
1
1. integerValue : replaced Integer return value with 0 for org/opensearch/sql/data/model/AbstractExprNumberValue::integerValue → KILLED
|
return value.intValue(); |
37
|
|
} |
38
|
|
|
39
|
|
@Override |
40
|
|
public Long longValue() { |
41
|
1
1. longValue : replaced Long return value with 0L for org/opensearch/sql/data/model/AbstractExprNumberValue::longValue → KILLED
|
return value.longValue(); |
42
|
|
} |
43
|
|
|
44
|
|
@Override |
45
|
|
public Float floatValue() { |
46
|
1
1. floatValue : replaced Float return value with 0 for org/opensearch/sql/data/model/AbstractExprNumberValue::floatValue → KILLED
|
return value.floatValue(); |
47
|
|
} |
48
|
|
|
49
|
|
@Override |
50
|
|
public Double doubleValue() { |
51
|
1
1. doubleValue : replaced Double return value with 0 for org/opensearch/sql/data/model/AbstractExprNumberValue::doubleValue → KILLED
|
return value.doubleValue(); |
52
|
|
} |
53
|
|
|
54
|
|
@Override |
55
|
|
public int hashCode() { |
56
|
1
1. hashCode : replaced int return with 0 for org/opensearch/sql/data/model/AbstractExprNumberValue::hashCode → KILLED
|
return Objects.hashCode(value); |
57
|
|
} |
58
|
|
} |
| | Mutations |
21 |
|
1.1 Location : isNumber Killed by : org.opensearch.sql.data.utils.ExprValueOrderingTest.[engine:junit-jupiter]/[class:org.opensearch.sql.data.utils.ExprValueOrderingTest]/[method:order_compare_value_with_compatible_number_type()] replaced boolean return with false for org/opensearch/sql/data/model/AbstractExprNumberValue::isNumber → KILLED
|
26 |
|
1.1 Location : byteValue Killed by : org.opensearch.sql.data.model.ExprValueUtilsTest.[engine:junit-jupiter]/[class:org.opensearch.sql.data.model.ExprValueUtilsTest]/[test-template:getValue(org.opensearch.sql.data.model.ExprValue, java.util.function.Function, java.lang.Object)]/[test-template-invocation:#1] replaced return value with null for org/opensearch/sql/data/model/AbstractExprNumberValue::byteValue → KILLED
|
31 |
|
1.1 Location : shortValue Killed by : org.opensearch.sql.data.model.ExprValueUtilsTest.[engine:junit-jupiter]/[class:org.opensearch.sql.data.model.ExprValueUtilsTest]/[test-template:getValue(org.opensearch.sql.data.model.ExprValue, java.util.function.Function, java.lang.Object)]/[test-template-invocation:#2] replaced Short return value with 0 for org/opensearch/sql/data/model/AbstractExprNumberValue::shortValue → KILLED
|
36 |
|
1.1 Location : integerValue Killed by : org.opensearch.sql.data.model.ExprValueUtilsTest.[engine:junit-jupiter]/[class:org.opensearch.sql.data.model.ExprValueUtilsTest]/[test-template:getValue(org.opensearch.sql.data.model.ExprValue, java.util.function.Function, java.lang.Object)]/[test-template-invocation:#3] replaced Integer return value with 0 for org/opensearch/sql/data/model/AbstractExprNumberValue::integerValue → KILLED
|
41 |
|
1.1 Location : longValue Killed by : org.opensearch.sql.data.model.ExprValueUtilsTest.[engine:junit-jupiter]/[class:org.opensearch.sql.data.model.ExprValueUtilsTest]/[test-template:getValue(org.opensearch.sql.data.model.ExprValue, java.util.function.Function, java.lang.Object)]/[test-template-invocation:#4] replaced Long return value with 0L for org/opensearch/sql/data/model/AbstractExprNumberValue::longValue → KILLED
|
46 |
|
1.1 Location : floatValue Killed by : org.opensearch.sql.data.model.ExprValueUtilsTest.[engine:junit-jupiter]/[class:org.opensearch.sql.data.model.ExprValueUtilsTest]/[test-template:getValue(org.opensearch.sql.data.model.ExprValue, java.util.function.Function, java.lang.Object)]/[test-template-invocation:#5] replaced Float return value with 0 for org/opensearch/sql/data/model/AbstractExprNumberValue::floatValue → KILLED
|
51 |
|
1.1 Location : doubleValue Killed by : org.opensearch.sql.data.model.ExprValueUtilsTest.[engine:junit-jupiter]/[class:org.opensearch.sql.data.model.ExprValueUtilsTest]/[test-template:getValue(org.opensearch.sql.data.model.ExprValue, java.util.function.Function, java.lang.Object)]/[test-template-invocation:#6] replaced Double return value with 0 for org/opensearch/sql/data/model/AbstractExprNumberValue::doubleValue → KILLED
|
56 |
|
1.1 Location : hashCode Killed by : org.opensearch.sql.planner.physical.RareTopNOperatorTest.[engine:junit-jupiter]/[class:org.opensearch.sql.planner.physical.RareTopNOperatorTest]/[method:top_n_with_group()] replaced int return with 0 for org/opensearch/sql/data/model/AbstractExprNumberValue::hashCode → KILLED
|