-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support BIND in SparqlQueryRenderer #71
Support BIND in SparqlQueryRenderer #71
Comments
The basic problem is that the QueryRenderer was implemented against the SPARQL 1.0 standard, and has never been extended to include the new SPARQL 1.1 features (even though RDF4J's query engine fully supports SPARQL 1.1). The renderer should be extended to be able to process these features. |
We need to have a discussion about the query render and the query builder tools, and the newly integrated spanqit module. |
Hi evrybody, so as this ticket is not discussed by any means, is there any way to create an AST based on a SPARQL Query, modify it, and transform it back to SPARQL? I believe this is a very viable feature for this project. Regards |
Creating an AST from a query is what the SPARQL parser package (specifically the class The only thing we don't really have full support for is serializing an AST back into a SPARQL query string. The SparqlQueryRenderer discussed in this issue has partial support, but as the ticket says, it's never been updated to deal with SPARQL 1.1. |
Signed-off-by: Andreas Schwarte <aschwarte10@gmail.com>
Signed-off-by: Jeen Broekstra <jeen.broekstra@gmail.com>
Use the new replacement for the cluster health check w.r.t waiting for relocating shards Signed-off-by: Andreas Schwarte <aschwarte10@gmail.com>
We need to use lucene 6.6.1 explicitly as there is a version check (assertion) in elasticsearch 5.6.9. In addition, the elasticsearch compliance test needs to be run with the Java security manager disabled. Also the "JarHell" class needs to be overridden with no-ops in order to make the test work with the classpath and all the transitive dependencies. Signed-off-by: Andreas Schwarte <aschwarte10@gmail.com>
Backwards codecs can be used to read indices created with an older lucene version Signed-off-by: Andreas Schwarte <aschwarte10@gmail.com>
Fix #71: Update Lucene, Solr and Elasticsearch dependencies
Upgrade components Lucene: 6.6.1 -> 7.2.1 Elasticsearch: 5.6.9 -> 6.2.4 Solr: 6.6.1 -> 7.2.1 Note: we cannot upgrade to lucene 7.3.1 as elasticsearch has a strict version dependency on 7.2.1. Also spatial4j cannot seamlessly be upgraded Signed-off-by: Andreas Schwarte <aschwarte10@gmail.com>
…optional/runtime Signed-off-by: Jeen Broekstra <jeen.broekstra@gmail.com>
…rial fixed typos and clarified a few things
…D sparql query Signed-off-by: Jerven bolleman <jerven.bolleman@sib.swiss>
eclipse-rdf4jGH-71 Add implementation for rendering BIND construct
… for simple ArbitraryLengthPath case Supported: function call inside BIND rdfs:subClassOf+ (ArbitraryLengthPath case)
…n rdf4j-queryparser
…D sparql query Signed-off-by: Jerven bolleman <jerven.bolleman@sib.swiss>
eclipse-rdf4jGH-71 Add implementation for rendering BIND construct
… for simple ArbitraryLengthPath case Supported: function call inside BIND rdfs:subClassOf+ (ArbitraryLengthPath case)
…n rdf4j-queryparser
…rting some additional functions STILL NOT SUPPORTED functions: coalesce exists / not exists in / not in bnode
GH-71 render bind clause with SPARQLQueryRenderer
Thanks @RedCrusaderJr, your fix for BIND has been merged in! I am planning to pick up further improvements as subtasks of this issue. |
Closing this as complete, further improvements will be taken care of as followup tasks. |
(Migrated from https://openrdf.atlassian.net/browse/SES-2206 )
SPARQL 1.1 constructs cannot be rendered via the SparqlQueryRenderer class.
Subtasks
Examples
For example If I parse this query with QueryParserUtil.parseQuery:
And then render the ParsedQuery back out again with SPARQLQueryRenderer, it appears to lose the binding clause, returning the following string:
Looking at renderTupleExpr in SparqlTupleExprRenderer I can see that the following lines are commented out:
With the following commented out in SPARQLQueryRenderer:
I believe these lines are commented out in error and that they should be commented back in in order to get be able to round trip queries from SPARQL text into the AST and back out again.
Other SPARQL 1.1 queries that fail include:
SELECT (COUNT (*) as ?c) WHERE { ?s ?p ?o }
is rendered as
select ?c where { ?s ?p ?o }
and the query
SELECT (?p as ?x) WHERE { ?s ?p ?o }
is rendered as
select ?p WHERE { ?s ?p ?o }
The text was updated successfully, but these errors were encountered: