afs opened a new issue, #2799:
URL: https://github.com/apache/jena/issues/2799
### Version
5.2.0
### What happened?
Substitution applied by `QueryTransformOps` does not put assignments into
the projection if the query is `SELECT *`.
### Relevant output and stacktrace
```shell
public class mainSelectStarSubstitution {
public static void main() {
Model model = ModelFactory.createDefaultModel();
model.add(OWL.Thing, RDF.type, OWL.Class);
model.add(OWL.Nothing, RDF.type, RDFS.Class);
Query query = QueryFactory.create("SELECT * { ?this a ?type }");
// **** Workaround.
//Query query = QueryFactory.create("SELECT ?this { ?this a
?type }");
query.setQueryResultStar(false);
QueryExecution qExec = QueryExecutionDatasetBuilder.create().
query(query).
model(model).
//initialBinding(Binding.builder().add(Var.alloc("this"),
OWL.Thing.asNode()).build()).
substitution("this", OWL.Thing).
build();
System.out.println(qExec.getQuery());
System.out.println(qExec.getQueryString());
}
}
```
### Are you interested in making a pull request?
Yes
--
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]