Class QueryEvaluationUtil
java.lang.Object
org.eclipse.rdf4j.query.algebra.evaluation.util.QueryEvaluationUtil
Utility functions used during logical query evaluation.
Performance note: every comparison operator now has its own specialised method. All hot paths are branch‑free
w.r.t. CompareOp, allowing the JVM to inline and optimise aggressively.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ValueExprEvaluationExceptionstatic final ValueExprEvaluationExceptionstatic final ValueExprEvaluationExceptionstatic final ValueExprEvaluationExceptionstatic final ValueExprEvaluationExceptionstatic final ValueExprEvaluationException -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancompare(Value l, Value r, Compare.CompareOp op) Deprecated.use the specialised compareXX methods instead.static booleancompare(Value l, Value r, Compare.CompareOp op, boolean strict) Deprecated.use the specialised compareXX methods instead.static booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleancompareLiterals(Literal l, Literal r, Compare.CompareOp op) Deprecated.use the specialised compareLiteralsXX methods instead.static booleancompareLiterals(Literal l, Literal r, Compare.CompareOp op, boolean strict) Deprecated.use the specialised compareLiteralsXX methods instead.static booleancompareLiteralsEQ(Literal l, Literal r) static booleancompareLiteralsEQ(Literal l, Literal r, boolean strict) static booleancompareLiteralsGE(Literal l, Literal r) static booleancompareLiteralsGE(Literal l, Literal r, boolean strict) static booleancompareLiteralsGT(Literal l, Literal r) static booleancompareLiteralsGT(Literal l, Literal r, boolean strict) static booleancompareLiteralsLE(Literal l, Literal r) static booleancompareLiteralsLE(Literal l, Literal r, boolean strict) static booleancompareLiteralsLT(Literal l, Literal r) static booleancompareLiteralsLT(Literal l, Literal r, boolean strict) static booleancompareLiteralsNE(Literal l, Literal r) static booleancompareLiteralsNE(Literal l, Literal r, boolean strict) static booleanstatic booleanstatic booleanstatic booleanstatic booleancompareWithOperator(Compare.CompareOp op, int c) static booleancompatibleArguments(Literal arg1, Literal arg2) Checks whether the supplied two literal arguments are 'argument compatible' according to the SPARQL definition.static booleangetEffectiveBooleanValue(Value value) static booleanstatic booleanstatic booleanisSimpleLiteral(boolean lang, CoreDatatype dt) static booleanstatic booleanstatic booleanstatic boolean
-
Field Details
-
INDETERMINATE_DATE_TIME_EXCEPTION
-
STRING_WITH_OTHER_SUPPORTED_TYPE_EXCEPTION
-
NUMERIC_WITH_OTHER_SUPPORTED_TYPE_EXCEPTION
-
DATE_WITH_OTHER_SUPPORTED_TYPE_EXCEPTION
-
UNSUPPOERTED_TYPES_EXCEPTION
-
NOT_COMPATIBLE_AND_ORDERED_EXCEPTION
-
-
Constructor Details
-
QueryEvaluationUtil
public QueryEvaluationUtil()
-
-
Method Details
-
getEffectiveBooleanValue
- Throws:
ValueExprEvaluationException
-
compareEQ
- Throws:
ValueExprEvaluationException
-
compareEQ
public static boolean compareEQ(Value l, Value r, boolean strict) throws ValueExprEvaluationException - Throws:
ValueExprEvaluationException
-
compareNE
- Throws:
ValueExprEvaluationException
-
compareNE
public static boolean compareNE(Value l, Value r, boolean strict) throws ValueExprEvaluationException - Throws:
ValueExprEvaluationException
-
compareLT
- Throws:
ValueExprEvaluationException
-
compareLT
public static boolean compareLT(Value l, Value r, boolean strict) throws ValueExprEvaluationException - Throws:
ValueExprEvaluationException
-
compareLE
- Throws:
ValueExprEvaluationException
-
compareLE
public static boolean compareLE(Value l, Value r, boolean strict) throws ValueExprEvaluationException - Throws:
ValueExprEvaluationException
-
compareGT
- Throws:
ValueExprEvaluationException
-
compareGT
public static boolean compareGT(Value l, Value r, boolean strict) throws ValueExprEvaluationException - Throws:
ValueExprEvaluationException
-
compareGE
- Throws:
ValueExprEvaluationException
-
compareGE
public static boolean compareGE(Value l, Value r, boolean strict) throws ValueExprEvaluationException - Throws:
ValueExprEvaluationException
-
compareLiteralsEQ
- Throws:
ValueExprEvaluationException
-
compareLiteralsEQ
public static boolean compareLiteralsEQ(Literal l, Literal r, boolean strict) throws ValueExprEvaluationException - Throws:
ValueExprEvaluationException
-
compareLiteralsNE
- Throws:
ValueExprEvaluationException
-
compareLiteralsNE
public static boolean compareLiteralsNE(Literal l, Literal r, boolean strict) throws ValueExprEvaluationException - Throws:
ValueExprEvaluationException
-
compareLiteralsLT
- Throws:
ValueExprEvaluationException
-
compareLiteralsLT
public static boolean compareLiteralsLT(Literal l, Literal r, boolean strict) throws ValueExprEvaluationException - Throws:
ValueExprEvaluationException
-
compareLiteralsLE
- Throws:
ValueExprEvaluationException
-
compareLiteralsLE
public static boolean compareLiteralsLE(Literal l, Literal r, boolean strict) throws ValueExprEvaluationException - Throws:
ValueExprEvaluationException
-
compareLiteralsGT
- Throws:
ValueExprEvaluationException
-
compareLiteralsGT
public static boolean compareLiteralsGT(Literal l, Literal r, boolean strict) throws ValueExprEvaluationException - Throws:
ValueExprEvaluationException
-
compareLiteralsGE
- Throws:
ValueExprEvaluationException
-
compareLiteralsGE
public static boolean compareLiteralsGE(Literal l, Literal r, boolean strict) throws ValueExprEvaluationException - Throws:
ValueExprEvaluationException
-
compare
@Deprecated public static boolean compare(Value l, Value r, Compare.CompareOp op) throws ValueExprEvaluationException Deprecated.use the specialised compareXX methods instead.- Throws:
ValueExprEvaluationException
-
compare
@Deprecated public static boolean compare(Value l, Value r, Compare.CompareOp op, boolean strict) throws ValueExprEvaluationException Deprecated.use the specialised compareXX methods instead.- Throws:
ValueExprEvaluationException
-
compareLiterals
@Deprecated public static boolean compareLiterals(Literal l, Literal r, Compare.CompareOp op) throws ValueExprEvaluationException Deprecated.use the specialised compareLiteralsXX methods instead.- Throws:
ValueExprEvaluationException
-
compareLiterals
@Deprecated public static boolean compareLiterals(Literal l, Literal r, Compare.CompareOp op, boolean strict) throws ValueExprEvaluationException Deprecated.use the specialised compareLiteralsXX methods instead.- Throws:
ValueExprEvaluationException
-
compareWithOperator
-
isPlainLiteral
-
isPlainLiteral
-
isSimpleLiteral
-
isSimpleLiteral
-
isSimpleLiteral
-
isStringLiteral
-
isStringLiteral
-
compatibleArguments
Checks whether the supplied two literal arguments are 'argument compatible' according to the SPARQL definition.- Parameters:
arg1- the first argumentarg2- the second argument- Returns:
- true iff the two supplied arguments are argument compatible, false otherwise
- See Also:
-