Skip to content
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

CONSTRUCT WHERE is not supported #1349

Open
white-gecko opened this issue May 16, 2024 · 1 comment
Open

CONSTRUCT WHERE is not supported #1349

white-gecko opened this issue May 16, 2024 · 1 comment

Comments

@white-gecko
Copy link

As I understand the SPARQL 1.1 standard the following two queries should be equal (cf. https://www.w3.org/TR/sparql11-query/#constructWhere):

https://qlever.cs.uni-freiburg.de/dnb/k1Yz2K:

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX dcterms: <http://purl.org/dc/terms/>
CONSTRUCT {
  ?page foaf:isPrimaryTopicOf ?topic; dc:title ?title; dcterms:medium <http://rdaregistry.info/termList/RDACarrierType/1018> .
  ?snapshot dcterms:isPartOf ?page .
} WHERE {
  ?page foaf:isPrimaryTopicOf ?topic; dc:title ?title; dcterms:medium <http://rdaregistry.info/termList/RDACarrierType/1018> .
  ?snapshot dcterms:isPartOf ?page .
} LIMIT 100

https://qlever.cs.uni-freiburg.de/dnb/4yew0o:

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX dcterms: <http://purl.org/dc/terms/>
CONSTRUCT WHERE {
  ?page foaf:isPrimaryTopicOf ?topic; dc:title ?title; dcterms:medium <http://rdaregistry.info/termList/RDACarrierType/1018> .
  ?snapshot dcterms:isPartOf ?page .
} LIMIT 100

The first gives results the second doesn't.

@joka921
Copy link
Member

joka921 commented May 17, 2024

Thanks for reporting this, as far as I understand the SPARQL grammar, you are absolutely right.
I just have to look if this is a two line fix, or if it requires to rewrite large parts of the parser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants