Skip to content

Commit 4d1e8d1

Browse files
GH-4769 Surfaced a bug in the comparison of null values (UNDEF)
Signed-off-by: Jerven Bolleman <jerven.bolleman@sib.swiss>
1 parent f06d95f commit 4d1e8d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/queryalgebra/evaluation/src/main/java/org/eclipse/rdf4j/query/algebra/evaluation/util/QueryEvaluationUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public static boolean compare(Value leftVal, Value rightVal, CompareOp operator)
107107

108108
public static boolean compare(Value leftVal, Value rightVal, CompareOp operator, boolean strict)
109109
throws ValueExprEvaluationException {
110-
if (leftVal.isLiteral() && rightVal.isLiteral()) {
110+
if (leftVal != null && leftVal.isLiteral() && rightVal != null && rightVal.isLiteral()) {
111111
// Both left and right argument is a Literal
112112
return compareLiterals((Literal) leftVal, (Literal) rightVal, operator, strict);
113113
} else {

0 commit comments

Comments
 (0)