Closed gsvarovsky closed 4 years ago
This is an interesting issue that probably requires more research. The reason why I use the rangeBoundary
parameter is that I sometimes want to check for equality only on the string representation of the numerical value:
What this allows us to do is to compare numerical values across different numerical datatypes, which is very important in our primary use case. Dropping that parameter prevents us from being able to do so. This said, there clearly is an issue somewhere that needs to be addressed; I will look at this as soon as possible and get back to you.
@gsvarovsky I might have found something but I won't have time to test it properly until Thursday or Friday. If you have the spare cycles, could you test the following change?
src/lib/rdf/serialization.ts
, line 164:
case 'Literal':
if (rangeBoundary) {
const value = importLiteralTerm(term, rangeBoundary);
return { gte: value, lte: value };
}
return importLiteralTerm(term, rangeBoundary);
default:
Closing this PR as I've manually brought in the fix and the test into my current working branch, which is about to become the new master.
I came across this problem in testing #91. Without the fix in serialization.ts, the new test fails.
SPARQL test results are:
test-rdf:sparql10: 219 / 438 tests succeeded
test-rdf:sparql11: 97 / 271 tests succeeded
I'll merge this change into #91 too if OK.