On my Stardog Cloud instance, in Stardog Studio, I get results running this CONSTRUCT statement:
prefix : <urn:myexample:>
CONSTRUCT {?s ?p ?o} FROM :graphX WHERE {?s ?p ?o} } ORDER BY ?s ?p ?o
Notice the TWO closing curly brackets before the ORDER BY (which is a syntax error).
But, I get an error running the correctly formatted query:
prefix : <urn:myexample:>
CONSTRUCT {?s ?p ?o} FROM :graphX WHERE {?s ?p ?o} ORDER BY ?s ?p ?o
I get the error:
000012: com.complexible.stardog.plan.eval.operator.OperatorException: Uncaught error during query evaluation: NullPointerException:
This is new behavior since the maintenance update.
BTW, via pystardog, neither query executes. The double curly brackets indeed generate a syntax error, but the correct syntax returns the NullPointer exception.
Sorry for the delayed response. This must be 2 separate issues. Stardog correctly fails to parse the 1st query (that's why you get the syntax error from pystardog) but somehow Studio doesn't show it. I'll check with the UI team.
As for the 2nd issue, I confirm that this is a server-side failure, most likely data-specific (esp. if it goes away if you drop the ORDER BY). Any chance we can look at your data while investigating it?
Pavel, When I remove the ORDER BY, I get results in Studio with a correctly formatted query.
BUT, the data has edge properties!
This is not handled by pystardog when I remove the ORDER BY. I get the error
"< :Sentence_de4817bb-5794 :rhetorical_device "logos" does not look like a valid URI, trying to serialize this will break. (term.py:287)"
This somehow (likley) plays into the NullPointer when using ORDER BY.
We have been able to reproduce both issues (the NPE and Studio ignoring invalid the }). We'll try to fix the former before the next release.
For now the workaround should be to avoid ORDER BY on a variable which could have embedded statements as values. It's indeed a problem with edge properties.
My understanding is that pystardog just doesn't support edge properties at the moment. I will create a ticket for that, but its release cycle is different from the platform and I cannot tell when that feature will be released.