karmaresearch / vlog

Apache License 2.0
55 stars 9 forks source link

Wrong term type in result from Trident #55

Closed mkroetzsch closed 1 year ago

mkroetzsch commented 4 years ago

When I query a trident data source from VLog, strings in the RDF data are returned as abstract constants with IRIs. To reporduce:

CerielJacobs commented 4 years ago

I am trying to reproduce this with the low-level VLog Java bindings, but failing miserably. I created a trident database, with one entry:

“mies” If I query this using a TermQueryIterator, I get [CONSTANT: , CONSTANT: , CONSTANT: "mies”] which is correct, I think. > On 25 Aug 2020, at 16:16, Markus Krötzsch wrote: > > > When I query a trident data source from VLog, strings in the RDF data are returned as abstract constants with IRIs. To reporduce: > > • Create a trident database from an RDF file that contains a string literal "string" > • Use that trident database in VLog as a data source and query for the data. > • The result should be <"string"> where "string" was expecteed > — > You are receiving this because you are subscribed to this thread. > Reply to this email directly, view it on GitHub, or unsubscribe. >
mkroetzsch commented 4 years ago

After some joint debugging, it turned out that the incorrect term in VLog is an untyped string "string" (distinct from the usual version "string"^^xsd:string). Rulewerk wrongly interpreted this type-less constant to refer to an abstract constant. This has been changed in Rulewerk in a recent commit.

This fixes only the appearance in Rulewerk. The string should still be encoded with xsd:string in VLog in order to join correctly with other strings from RDF sources. As it is now, a Trident database built from an RDF file with a string will not join with that same RDF file.

irina-dragoste commented 1 year ago

Fixed, SPARQL results remain to be tested in open issue https://github.com/knowsys/rulewerk/issues/223.