Add custom compare for FILTERs in SPARQL queries #5085
-
Hello, We are using a custom sail to handle the RDF storage, it provides an index for more operations, but in it, we are implementing a way to compare a number/date literal without having to look at the string/value itself. I would like to know if it is possible to add our logic without having to fully replace the comparison functions? In my mind, the best would be to first mark these comparisons in the filter after the query parsing, then at evaluation time to evaluate our custom types, but the compare literal evaluation seems to be bound to the function |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Usually you would override the evaluation strategy and have it provide your own iterator with your own filter logic. You can check the filter node first, so if the filter contains something you don't support yet you can have it fallback to the existing implementation. Here is where I would start: |
Beta Was this translation helpful? Give feedback.
Usually you would override the evaluation strategy and have it provide your own iterator with your own filter logic. You can check the filter node first, so if the filter contains something you don't support yet you can have it fallback to the existing implementation.
Here is where I would start:
rdf4j/core/queryalgebra/evaluation/src/main/java/org/eclipse/rdf4j/query/algebra/evaluation/impl/DefaultEvaluationStrategy.java
Line 617 in 2a998c3