qlever
qlever copied to clipboard
`rdfs:label` + `FILTER` optimization breaks with property paths
A query with the following clause led to an OOM error (https://qlever.dev/wikidata/8cm28Y):
OPTIONAL {
?child wdt:P105/rdfs:label ?child_rank_label . FILTER (LANG(?child_rank_label) = 'en')
}
Tried to allocate 6.7 GB, but only 6.4 GB were available
However it changing it to the following worked:
OPTIONAL {
?child wdt:P105 ?child_rank .
?child_rank rdfs:label ?child_rank_label . FILTER (LANG(?child_rank_label) = 'en')
}
So I think the optimization for rdfs:label in conjunction with FILTER(LANG(...) = ...) does not (yet) apply correctly to expressions with simple property paths.
This also seems to work fine so that's maybe an easier workaround.
OPTIONAL {
?child wdt:P105 [ rdfs:label ?child_rank_label ] . FILTER (LANG(?child_rank_label) = 'en')
}