ExprLongValue.java

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 Long Value.
14
 */
15
public class ExprLongValue extends AbstractExprNumberValue {
16
17
  public ExprLongValue(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/ExprLongValue::value → KILLED
    return longValue();
24
  }
25
26
  @Override
27
  public ExprType type() {
28 1 1. type : replaced return value with null for org/opensearch/sql/data/model/ExprLongValue::type → KILLED
    return ExprCoreType.LONG;
29
  }
30
31
  @Override
32
  public String toString() {
33 1 1. toString : replaced return value with "" for org/opensearch/sql/data/model/ExprLongValue::toString → KILLED
    return longValue().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/ExprLongValue::compare → KILLED
    return Long.compare(longValue(), other.longValue());
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/ExprLongValue::equal → KILLED
2. equal : replaced boolean return with true for org/opensearch/sql/data/model/ExprLongValue::equal → KILLED
    return longValue().equals(other.longValue());
44
  }
45
}

Mutations

23

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:crc32_string_value(java.lang.String)]/[test-template-invocation:#2]
replaced return value with null for org/opensearch/sql/data/model/ExprLongValue::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:#4]
replaced return value with null for org/opensearch/sql/data/model/ExprLongValue::type → KILLED

33

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:log2_long_value(java.lang.Long)]/[test-template-invocation:#1]
replaced return value with "" for org/opensearch/sql/data/model/ExprLongValue::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:natural_order_long_value()]
replaced int return with 0 for org/opensearch/sql/data/model/ExprLongValue::compare → KILLED

43

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_notequal(org.opensearch.sql.data.model.ExprValue, org.opensearch.sql.data.model.ExprValue)]/[test-template-invocation:#4]
replaced boolean return with false for org/opensearch/sql/data/model/ExprLongValue::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:#13]
replaced boolean return with true for org/opensearch/sql/data/model/ExprLongValue::equal → KILLED

Active mutators

Tests examined


Report generated by PIT 1.9.0