Page MenuHomePhabricator

EXISTS inside BIND always false when hint included
Open, LowPublicBUG REPORT

Description

Steps to reproduce:

  1. Go to https://query.wikidata.org/
  2. Enter the following query:
SELECT DISTINCT ?item ?isFictional WHERE {
  VALUES ?item {wd:Q315796}
  
  ?item wdt:P31/wdt:P279* wd:Q14897293.
  hint:Prior hint:gearing "forward".
  
  FILTER EXISTS {
    ?item wdt:P31/wdt:P279* wd:Q14897293.
    hint:Prior hint:gearing "forward".
  }

  BIND(EXISTS {
    ?item wdt:P31/wdt:P279* wd:Q14897293.
    hint:Prior hint:gearing "forward".
  } as ?isFictional)
}
  1. Run the query

Expected result:

?isFictional is true, since Santa Claus is fictional and passed the selector and filter

Actual result:

?isFictional is false

Event Timeline

Svizel_pritula changed the subtype of this task from "Task" to "Bug Report".Sep 15 2020, 10:32 AM

I'm having the same issue. I think this kind of queries are common and this should be given higher priority.