[
https://issues.apache.org/jira/browse/JENA-971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14623556#comment-14623556
]
Andy Seaborne edited comment on JENA-971 at 7/12/15 9:08 AM:
-------------------------------------------------------------
But I now get this illegal query;
{noformat}
SELECT *
WHERE
{ ?s ?p ?o
UNION
{ SELECT ?s ?p ?o
WHERE
{ ?s ?p ?o }
}
}
{noformat}
which should be:
{noformat}
SELECT *
WHERE
{ { ?s ?p ?o }
UNION
{ SELECT ?s ?p ?o
WHERE
{ ?s ?p ?o }
}
}
{noformat}
each side of the UNION is a ElementGroup.
was (Author: claudenw):
But I now get this illegal query;
SELECT *
WHERE
{ ?s ?p ?o
UNION
{ SELECT ?s ?p ?o
WHERE
{ ?s ?p ?o }
}
}
which should be:
SELECT *
WHERE
{ { ?s ?p ?o }
UNION
{ SELECT ?s ?p ?o
WHERE
{ ?s ?p ?o }
}
}
each side of the UNION is a ElementGroup.
> QueryBuilder does not properly construct UNIONs
> -----------------------------------------------
>
> Key: JENA-971
> URL: https://issues.apache.org/jira/browse/JENA-971
> Project: Apache Jena
> Issue Type: Bug
> Components: Jena
> Affects Versions: Jena 2.13.1, Jena 3.0.0
> Reporter: Claude Warren
> Assignee: Claude Warren
> Fix For: Jena 2.13.1, Jena 3.0.0
>
>
> The QueryBuilder method addUnion() always adds a new union to the query
> pattern. It should only add one if the last element in the query pattern is
> not a union.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)