On 28/03/16 16:33, Joshua TAYLOR wrote:
On Mon, Mar 28, 2016 at 11:27 AM, Joshua TAYLOR <[email protected]> wrote:
On Mon, Mar 28, 2016 at 6:43 AM, Andy Seaborne <[email protected]> wrote:
Encountered " "distinct" "DISTINCT "" at line 6, column 129
Check the syntax at that point.
(GROUP_CONCAT DISTINCT (?x) ...
is wrong.
Andy,
I actually started another thread about this (not knowing about this
one), and that error looks like it might on Jena's end. If you throw,
e.g.,
select (group_concat(distinct ?x) as ?y) {}
into the validator on sparql.org, it parses it and formats it as
select (group_concat distinct (?x) as ?y) where {}
If Jena's parsing it and sending the re-formatted query along, the
remote endpoint would complain about the injected syntax error.
Is it significant that
https://github.com/apache/jena/blob/0653392c24d6ec0d83c97c77f789a85b3c3b79de/jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AggGroupConcat.java#L71
appends a group_concat with a following (, whereas
https://github.com/apache/jena/blob/0653392c24d6ec0d83c97c77f789a85b3c3b79de/jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AggGroupConcat.java#L91
doesn't?
Hi Joshua,
Thanks for taking the time to investigate.
Good news - this is a fixed bug.
https://issues.apache.org/jira/browse/JENA-1091
so it is not in 3.0.1 release, getting fix on the day of the release, 3
days after the build.
asSparqlExpr is the method that creates SPARQL syntax:
and it says:
x.append("GROUP_CONCAT(") ;
if ( isDistinct )
x.append("DISTINCT ") ;
so it is GROUP_CONCAT(DISTINCT ...) now.
prefixGroupConcatString creates syntax for the algebra form.
sparql.org is not up-to-date - unfortunately that machine (it's part of
the Apache infrastructure and a FreeBSD host machine running with jails
to isolate services) does not have an installable Java8 so it is not
up-to-date. It needs migrating sometime.
Andy
The OP is currently bombarding the users@ moderator with emails due to
not subscribing.
Andy
On 28/03/16 11:39, Andy Seaborne wrote:
Hi there,
You don't appear to be subscribed to the [email protected] mailing
list, or you sent a message before replying to the acknowledgement. Your
email has ended up in the moderators inbox. If you are not subscribed,
you will not see replies to your question.
Please could you subscribe by sending an email to
[email protected]
then reply to the confirmation.
After that, please could you re-send the message.
You will then receive all replies that are sent to the list.
More details:
http://jena.apache.org/help_and_support/index.html
Andy
On 28/03/16 11:37, [email protected] wrote:
Dears,
I've been having this problem since a long time and unfortunately no
one on StackOverFlow could find the solution. It is definitely a bug
in Jena, could you have a look please?
https://stackoverflow.com/questions/36137483/sparql-query-works-on-the-fuseki-interface-but-in-jena
--
Joshua Taylor, http://www.cs.rpi.edu/~tayloj/