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 org.opensearch.sql.data.type.ExprCoreType; |
10
|
|
import org.opensearch.sql.data.type.ExprType; |
11
|
|
|
12
|
|
/** |
13
|
|
* Expression Integer Value. |
14
|
|
*/ |
15
|
|
public class ExprIntegerValue extends AbstractExprNumberValue { |
16
|
|
|
17
|
|
public ExprIntegerValue(Number value) { |
18
|
|
super(value); |
19
|
|
} |
20
|
|
|
21
|
|
@Override |
22
|
|
public Object value() { |
23
|
1
1. value : replaced return value with null for org/opensearch/sql/data/model/ExprIntegerValue::value → KILLED
|
return integerValue(); |
24
|
|
} |
25
|
|
|
26
|
|
@Override |
27
|
|
public ExprType type() { |
28
|
1
1. type : replaced return value with null for org/opensearch/sql/data/model/ExprIntegerValue::type → KILLED
|
return ExprCoreType.INTEGER; |
29
|
|
} |
30
|
|
|
31
|
|
@Override |
32
|
|
public String toString() { |
33
|
1
1. toString : replaced return value with "" for org/opensearch/sql/data/model/ExprIntegerValue::toString → KILLED
|
return integerValue().toString(); |
34
|
|
} |
35
|
|
|
36
|
|
@Override |
37
|
|
public int compare(ExprValue other) { |
38
|
1
1. compare : replaced int return with 0 for org/opensearch/sql/data/model/ExprIntegerValue::compare → KILLED
|
return Integer.compare(integerValue(), other.integerValue()); |
39
|
|
} |
40
|
|
|
41
|
|
@Override |
42
|
|
public boolean equal(ExprValue other) { |
43
|
2
1. equal : replaced boolean return with false for org/opensearch/sql/data/model/ExprIntegerValue::equal → KILLED
2. equal : replaced boolean return with true for org/opensearch/sql/data/model/ExprIntegerValue::equal → KILLED
|
return integerValue().equals(other.integerValue()); |
44
|
|
} |
45
|
|
} |
| | Mutations |
23 |
|
1.1 Location : value Killed by : org.opensearch.sql.expression.operator.predicate.UnaryPredicateOperatorTest.[engine:junit-jupiter]/[class:org.opensearch.sql.expression.operator.predicate.UnaryPredicateOperatorTest]/[test-template:test_ifnull_predicate(org.opensearch.sql.expression.Expression, org.opensearch.sql.expression.Expression, org.opensearch.sql.expression.Expression)]/[test-template-invocation:#3] replaced return value with null for org/opensearch/sql/data/model/ExprIntegerValue::value → KILLED
|
28 |
|
1.1 Location : type Killed by : org.opensearch.sql.data.model.ExprValueUtilsTest.[engine:junit-jupiter]/[class:org.opensearch.sql.data.model.ExprValueUtilsTest]/[test-template:getType(org.opensearch.sql.data.model.ExprValue, org.opensearch.sql.data.type.ExprCoreType)]/[test-template-invocation:#3] replaced return value with null for org/opensearch/sql/data/model/ExprIntegerValue::type → KILLED
|
33 |
|
1.1 Location : toString Killed by : org.opensearch.sql.storage.bindingtuple.BindingTupleTest.[engine:junit-jupiter]/[class:org.opensearch.sql.storage.bindingtuple.BindingTupleTest]/[method:resolve_literal_expression_throw_exception()] replaced return value with "" for org/opensearch/sql/data/model/ExprIntegerValue::toString → KILLED
|
38 |
|
1.1 Location : compare 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 int return with 0 for org/opensearch/sql/data/model/ExprIntegerValue::compare → KILLED
|
43 |
|
1.1 Location : equal 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:#9] replaced boolean return with false for org/opensearch/sql/data/model/ExprIntegerValue::equal → KILLED 2.2 Location : equal Killed by : org.opensearch.sql.expression.window.frame.PeerRowsWindowFrameTest.[engine:junit-jupiter]/[class:org.opensearch.sql.expression.window.frame.PeerRowsWindowFrameTest]/[method:test_window_definition_with_no_partition_by()] replaced boolean return with true for org/opensearch/sql/data/model/ExprIntegerValue::equal → KILLED
|