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

Property path and language FILTER broken #276

Closed
niklas88 opened this issue Aug 20, 2019 · 2 comments
Closed

Property path and language FILTER broken #276

niklas88 opened this issue Aug 20, 2019 · 2 comments
Assignees

Comments

@niklas88
Copy link
Member

niklas88 commented Aug 20, 2019

The following query returns an empty result while both skos:altLabel and rdfs:label do return results. Leaving away the FILTER makes the query makes the query work

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?alias WHERE {
  wd:Q567 skos:altLabel|rdfs:label ?alias .
  FILTER (lang(?alias) = "en")
} 

Removing the FILTER unbreaks the query as does explicit use of the internal @en@ marker as in

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX schema: <http://schema.org/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT ?label WHERE {
  wd:Q567 @en@skos:altLabel|@en@rdfs:label ?label .
}

So I guess the problem is that we're failing to apply the automatic @en@ transformation on property paths.

@niklas88 niklas88 changed the title Property path alternative problem Property path and language FILTER broken Aug 21, 2019
niklas88 added a commit that referenced this issue Nov 12, 2019
Fix FILTER (lang(…) = …) for predicate paths #276
@lehmann-4178656ch
Copy link
Member

lehmann-4178656ch commented Nov 19, 2019

Both queries now yield the same result on http://qlever.cs.uni-freiburg.de/Wikidata_Full/ I think this issue can be closed @niklas88 ?

@niklas88
Copy link
Member Author

@lehmann-4178656ch yes forgot to add the "fixes" part in the commit message.

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

3 participants