From 4d1e8d1371fc7bef611af90bc1a09fa00383c634 Mon Sep 17 00:00:00 2001 From: Jerven Bolleman Date: Wed, 22 Nov 2023 08:14:31 +0100 Subject: [PATCH] GH-4769 Surfaced a bug in the comparison of null values (UNDEF) Signed-off-by: Jerven Bolleman --- .../query/algebra/evaluation/util/QueryEvaluationUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/queryalgebra/evaluation/src/main/java/org/eclipse/rdf4j/query/algebra/evaluation/util/QueryEvaluationUtil.java b/core/queryalgebra/evaluation/src/main/java/org/eclipse/rdf4j/query/algebra/evaluation/util/QueryEvaluationUtil.java index 2e8c09491c4..51bb048d0e8 100644 --- a/core/queryalgebra/evaluation/src/main/java/org/eclipse/rdf4j/query/algebra/evaluation/util/QueryEvaluationUtil.java +++ b/core/queryalgebra/evaluation/src/main/java/org/eclipse/rdf4j/query/algebra/evaluation/util/QueryEvaluationUtil.java @@ -107,7 +107,7 @@ public static boolean compare(Value leftVal, Value rightVal, CompareOp operator) public static boolean compare(Value leftVal, Value rightVal, CompareOp operator, boolean strict) throws ValueExprEvaluationException { - if (leftVal.isLiteral() && rightVal.isLiteral()) { + if (leftVal != null && leftVal.isLiteral() && rightVal != null && rightVal.isLiteral()) { // Both left and right argument is a Literal return compareLiterals((Literal) leftVal, (Literal) rightVal, operator, strict); } else {