FILTER vs VALUES inconsistency, and SPARQL SELECT returning no data

10 views
Skip to first unread message

Ric Roberts

unread,
Jul 23, 2015, 11:34:01 AM7/23/15
to Stardog
Hello.

This query (which I accept could be written more simply; it's from some legacy code in an old app!)...

SELECT ?la
    WHERE {
    LIMIT 1
... should return results (the postcode exists), but it returns no data (not even column headers in the results).

But if I rewrite it to this:

   SELECT ?la
    WHERE {
    }
    LIMIT 1

... it works, and returns the right data.

So I think there are 2 issues here:

1) SELECT Queries should never no data at all - they should always return columns for the bound variables, even if there are no results. I think we've reported something similar to this before.
2) FILTER and VALUES have inconsistent behaviour.



Pavel Klinov

unread,
Jul 23, 2015, 11:43:44 AM7/23/15
to sta...@clarkparsia.com
Hi Ric,

2) sounds like a known problem which was fixed after 3.1.3 had been released. Any chance you can restart the server and try the query again? If it works for the first time, but not afterwards, then it's been fixed. 

Either way, I don't think VALUES really matters here, probably the following query:


would also return the result.

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

Ric Roberts

unread,
Jul 23, 2015, 11:51:45 AM7/23/15
to Stardog, pa...@clarkparsia.com
Thanks for letting us know. :)

Sure, I realise we could rewrite the query more simply (and have). This is a generated query from an old app that we used to run against jena-fuseki: we're moving the data over to stardog and re-tesitng it. We'd prefer not to have to go through all the old SPARQL and change it (as although a bit odd in some places, it is technically valid)!

Any ideas about issue (1): returning no column headers?

Michael Grove

unread,
Jul 23, 2015, 1:17:02 PM7/23/15
to stardog
On Thu, Jul 23, 2015 at 11:51 AM, Ric Roberts <r...@swirrl.com> wrote:
Thanks for letting us know. :)

Sure, I realise we could rewrite the query more simply (and have). This is a generated query from an old app that we used to run against jena-fuseki: we're moving the data over to stardog and re-tesitng it. We'd prefer not to have to go through all the old SPARQL and change it (as although a bit odd in some places, it is technically valid)!

Any ideas about issue (1): returning no column headers?

Where are you not seeing the headers, in the web console or the command line?  Or both?

Cheers,

Mike
Reply all
Reply to author
Forward
0 new messages