Open afs opened 1 month ago
5.2.0
From: https://lists.apache.org/thread/ox1hglkz3jcqp1onp2rqdk349fg2poqw
Substitution applied by QueryTransformOps does not put assignments into the projection if the query is SELECT *.
QueryTransformOps
SELECT *
public class mainSelectStarSubstitution { public static void main() { Model model = ModelFactory.createDefaultModel(); Binding initBinding = Binding.builder().add(Var.alloc("this"), OWL.Thing.asNode()).build(); 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.setQueryResultStar(false); QueryExecution qExec = QueryExecutionDatasetBuilder.create(). query(query). model(model). // Old way //initialBinding(initBinding). substitution("this", OWL.Thing). build(); System.out.println("qExec.getQuery() - original query"); System.out.println(qExec.getQuery()); System.out.println("qExec.getQueryString() - modified query"); System.out.println(qExec.getQueryString()); } }
Yes
Version
5.2.0
What happened?
From: https://lists.apache.org/thread/ox1hglkz3jcqp1onp2rqdk349fg2poqw
Substitution applied by
QueryTransformOps
does not put assignments into the projection if the query isSELECT *
.Relevant output and stacktrace
Are you interested in making a pull request?
Yes