First of all: thanks for creating this great library!
I've run into a problem which I think comes down to flint incorrectly handling BigDecimal literals with no fractional part.
Take this example query:
(flint/format-query
{:select '[?s]
:where [['?s '?p (bigdec 1)]]}
This currently (flint 0.3.0) produces SELECT ?s WHERE { ?s ?p 1 . }.
I think it should produce SELECT ?s WHERE { ?s ?p "1"^^xsd:decimal . }.
The reason is that 1 is interpreted as "1"^^xsd:integer, which is a different literal from "1"^^xsd::decimal. This means a pattern like ['?s '?p (bigdec 1)] in flint generates SPARQL which doesn't match triples with the object literal "1"^^xsd::decimal. Flint does emit 1.0 for (bigdec 1.0) which is interpreted as "1.0"^^xsd:decimal, but that is still considered a different literal from "1"^^xsd:decimal, so it doesn't fix the query.
First of all: thanks for creating this great library!
I've run into a problem which I think comes down to flint incorrectly handling
BigDecimalliterals with no fractional part.Take this example query:
This currently (flint 0.3.0) produces
SELECT ?s WHERE { ?s ?p 1 . }.I think it should produce
SELECT ?s WHERE { ?s ?p "1"^^xsd:decimal . }.The reason is that
1is interpreted as"1"^^xsd:integer, which is a different literal from"1"^^xsd::decimal. This means a pattern like['?s '?p (bigdec 1)]in flint generates SPARQL which doesn't match triples with the object literal"1"^^xsd::decimal. Flint does emit1.0for(bigdec 1.0)which is interpreted as"1.0"^^xsd:decimal, but that is still considered a different literal from"1"^^xsd:decimal, so it doesn't fix the query.