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

Or filter is broken in Wikidata SPARQL converter #255

Open
sileix opened this issue Sep 14, 2020 · 0 comments
Open

Or filter is broken in Wikidata SPARQL converter #255

sileix opened this issue Sep 14, 2020 · 0 comments
Labels
P2 We need to fix it (backlog)

Comments

@sileix
Copy link
Member

sileix commented Sep 14, 2020

E.g., now => @org.wikidata.city(), country == "Q30"^^org.wikidata:country || inception == makeDate(1894, 1, 1) => notify; is converted to

SELECT DISTINCT (?table0 as ?id) (?table0Label as ?idLabel) WHERE { 
  {?table0 wdt:P571 ?p0 FILTER (?p0 = "1894-01-01"^^xsd:dateTime)} UNION {?table0 wdt:P17 ?p3} . 
  FILTER (?p3 = wd:Q30). 
  ?table0 p:P31/ps:P31/wdt:P279* wd:Q515. 
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". ?table0 rdfs:label ?table0Label. } 
} limit 5 offset 0

while it should be

SELECT DISTINCT (?table0 as ?id) (?table0Label as ?idLabel) WHERE { 
  {?table0 wdt:P571 ?p0 FILTER (?p0 = "1894-01-01"^^xsd:dateTime)} UNION {?table0 wdt:P17 ?p3 FILTER (?p3 = wd:Q30) } . 
  ?table0 p:P31/ps:P31/wdt:P279* wd:Q515. 
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". ?table0 rdfs:label ?table0Label. } 
} limit 5 offset 0
@sileix sileix changed the title or operator is broken in Wikidata SPARQL converter Or filter is broken in Wikidata SPARQL converter Sep 14, 2020
@nrser nrser added the P2 We need to fix it (backlog) label Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 We need to fix it (backlog)
Projects
None yet
Development

No branches or pull requests

2 participants