[Mulgara-general] SPARQL filter not being applied.

Jim Irwin jimirwin at acm.org
Mon Jun 22 20:32:23 UTC 2009


> Hmmm, I'm not sure if I properly coded for cascading filters. I'm
> expecting that this is the issue. You can confirm for me by trying the
> filters in the opposite order. If this changes which one is being
> ignored, then it's an issue with the parsing.
>
> Until I have it fixed, you can always just use an "and" operator to
> join the conditions:
>
>  SELECT ?instance ?rvtx_auto_label
>  WHERE {{?instance rbrnr:Object-Name ?rvxtmp_1 .
>      FILTER (?rvxtmp_1 = "Gesture" && !isBLANK(?instance))}
>  OPTIONAL {?instance rdfs:label ?rvtx_auto_label .}}
>
> Regards,
> Paul
I tried both variants: using the and, and also changing the order of the filters.  Both worked, to a degree.  There is one remaining problem, which is that Mulgara didn't evaluate FILTER(rvxtmp_1 = "Gesture") to true when rvxtmp_1 actually had a value of "x"^^xsd:string rather than an untyped "x".  

I thought the SPARQL specification requires (or perhaps merely allows?) a FILTER to do type conversions?  Jena did return the expected instance when the property had an xsd:string value.

For Mulgara, I had to modify the query to FILTER(?rvxtmp_1 = "Gesture"^^xsd:string) in order to get the expected result.

Jim





More information about the Mulgara-general mailing list