Query with datatype cast gives inconsistent results

1 view
Skip to first unread message

Conrad Leonard

unread,
Jul 21, 2015, 8:46:03 PM7/21/15
to Stardog
This is another one of those queries that works once and then never more until db is dropped or server restarted; in this instance however no message "This scan does not provide an ordered output..." is  returned the second and subsequent times; the result is simply no data. So perhaps the underlying cause is different. The test dataset and query are very simple:

The data:

[conradL@qimr13054 ~]$ cat data.ttl 
@prefix ex: <http://example.org/> .

ex:a rdfs:label """example one"""^^xsd:string .
ex:a rdfs:label """example two"""^^xsd:string .


Make the db:

[conradL@qimr13054 ~]$ stardog-admin db create -n test -- data.ttl
Picked up JAVA_TOOL_OPTIONS: -Djavax.net.ssl.trustStore=/opt/local/genomeinfo/java/truststore/keystore.jks
Bulk loading data to new database test.
Loaded 2 triples to test from 1 file(s) in 00:00:00.359 @ 0.0K triples/sec.
Successfully created database 'test'.


Run this query from command line and I get one result:
[conradL@qimr13054 ~]$ stardog query -- test "SELECT * WHERE { ?x rdfs:label ?label . FILTER (?label = xsd:string('example one')) }"
Picked up JAVA_TOOL_OPTIONS: -Djavax.net.ssl.trustStore=/opt/local/genomeinfo/java/truststore/keystore.jks
+-------+----------------------------------------------------------+
|   x   |                          label                           |
+-------+----------------------------------------------------------+
| ex:a  | "example one"^^<http://www.w3.org/2001/XMLSchema#string> |
+-------+----------------------------------------------------------+

Repeat the query, and get no result:
[conradL@qimr13054 ~]$ stardog query -- test "SELECT * WHERE { ?x rdfs:label ?label . FILTER (?label = xsd:string('example one')) }"
Picked up JAVA_TOOL_OPTIONS: -Djavax.net.ssl.trustStore=/opt/local/genomeinfo/java/truststore/keystore.jks
+-------+-------+
|   x   | label |
+-------+-------+
+-------+-------+

Query returned 0 results in 00:00:00.026

(And forever more until db is dropped or server restarted...)

The same query without the xsd:string() returns one result all the time

Pavel Klinov

unread,
Jul 22, 2015, 4:01:30 AM7/22/15
to sta...@clarkparsia.com
Hi Conrad,

This is another manifestation of the same issue and it can also be avoided by adding -Dcom.complexible.stardog.plan.cache=false to STARDOG_JAVA_ARGS (or stardog-admin directly). 3.1.4 will provide a fix.

Again, thanks for the easy to run test case.

Cheers,
Pavel

--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en

Reply all
Reply to author
Forward
0 new messages