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 Byte Value. |
14
|
|
*/ |
15
|
|
public class ExprByteValue extends AbstractExprNumberValue { |
16
|
|
|
17
|
|
public ExprByteValue(Number value) { |
18
|
|
super(value); |
19
|
|
} |
20
|
|
|
21
|
|
@Override |
22
|
|
public int compare(ExprValue other) { |
23
|
1
1. compare : replaced int return with 0 for org/opensearch/sql/data/model/ExprByteValue::compare → KILLED
|
return Byte.compare(byteValue(), other.byteValue()); |
24
|
|
} |
25
|
|
|
26
|
|
@Override |
27
|
|
public boolean equal(ExprValue other) { |
28
|
2
1. equal : replaced boolean return with false for org/opensearch/sql/data/model/ExprByteValue::equal → KILLED
2. equal : replaced boolean return with true for org/opensearch/sql/data/model/ExprByteValue::equal → KILLED
|
return byteValue().equals(other.byteValue()); |
29
|
|
} |
30
|
|
|
31
|
|
@Override |
32
|
|
public Object value() { |
33
|
1
1. value : replaced return value with null for org/opensearch/sql/data/model/ExprByteValue::value → KILLED
|
return byteValue(); |
34
|
|
} |
35
|
|
|
36
|
|
@Override |
37
|
|
public ExprType type() { |
38
|
1
1. type : replaced return value with null for org/opensearch/sql/data/model/ExprByteValue::type → KILLED
|
return ExprCoreType.BYTE; |
39
|
|
} |
40
|
|
|
41
|
|
@Override |
42
|
|
public String toString() { |
43
|
1
1. toString : replaced return value with "" for org/opensearch/sql/data/model/ExprByteValue::toString → KILLED
|
return value().toString(); |
44
|
|
} |
45
|
|
} |
| | Mutations |
23 |
|
1.1 Location : compare Killed by : org.opensearch.sql.data.utils.ExprValueOrderingTest.[engine:junit-jupiter]/[class:org.opensearch.sql.data.utils.ExprValueOrderingTest]/[method:natural_order_byte_value()] replaced int return with 0 for org/opensearch/sql/data/model/ExprByteValue::compare → KILLED
|
28 |
|
1.1 Location : equal Killed by : org.opensearch.sql.expression.operator.predicate.BinaryPredicateOperatorTest.[engine:junit-jupiter]/[class:org.opensearch.sql.expression.operator.predicate.BinaryPredicateOperatorTest]/[test-template:test_equal(org.opensearch.sql.data.model.ExprValue, org.opensearch.sql.data.model.ExprValue)]/[test-template-invocation:#1] replaced boolean return with false for org/opensearch/sql/data/model/ExprByteValue::equal → KILLED 2.2 Location : equal Killed by : org.opensearch.sql.expression.operator.predicate.BinaryPredicateOperatorTest.[engine:junit-jupiter]/[class:org.opensearch.sql.expression.operator.predicate.BinaryPredicateOperatorTest]/[test-template:test_notequal(org.opensearch.sql.data.model.ExprValue, org.opensearch.sql.data.model.ExprValue)]/[test-template-invocation:#11] replaced boolean return with true for org/opensearch/sql/data/model/ExprByteValue::equal → KILLED
|
33 |
|
1.1 Location : value Killed by : org.opensearch.sql.expression.operator.arthmetic.MathematicalFunctionTest.[engine:junit-jupiter]/[class:org.opensearch.sql.expression.operator.arthmetic.MathematicalFunctionTest]/[test-template:abs_byte_value(java.lang.Byte)]/[test-template-invocation:#1] replaced return value with null for org/opensearch/sql/data/model/ExprByteValue::value → KILLED
|
38 |
|
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:#1] replaced return value with null for org/opensearch/sql/data/model/ExprByteValue::type → KILLED
|
43 |
|
1.1 Location : toString Killed by : org.opensearch.sql.expression.operator.arthmetic.MathematicalFunctionTest.[engine:junit-jupiter]/[class:org.opensearch.sql.expression.operator.arthmetic.MathematicalFunctionTest]/[test-template:abs_byte_value(java.lang.Byte)]/[test-template-invocation:#1] replaced return value with "" for org/opensearch/sql/data/model/ExprByteValue::toString → KILLED
|