afs opened a new issue, #2156:
URL: https://github.com/apache/jena/issues/2156
### Version
5.0.0
### Feature
See #2153 and #2155 .
Even if the algebra generator is changed to cope with the non-parser AST
generated by querybuilder (PR #2155), should the querybuilder try to generate
parser-compatible ASTs?
Example (Jena 4.10.0):
```java
public static void querybuilderOutput() {
SelectBuilder selectBuilder = new SelectBuilder();
selectBuilder.addFilter(selectBuilder.makeExpr("true"));
Query query = selectBuilder.build();
System.out.println(query);
Query query2 = QueryFactory.create(query.toString());
System.out.println(query2);
System.out.println("Parsed builder output equals input?
"+query.equals(query2));
}
```
Output:
```
SELECT *
WHERE
{ FILTER ( true )}
SELECT *
WHERE
{ FILTER ( true ) }
Parsed builder output equals input? false
```
Note the slight difference in the query strings due to the presence of the
ElementGroup in the second, parsed case, which isn't in querybuilder form.
The query patterns of the WHERE clause are:
- querybuilder : `ElementFilter(true)`
- parser : `ElementGroup( ElementFilter(true) )`.
### Are you interested in contributing a solution yourself?
None
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]