Herzi.Pinki created this task.
Herzi.Pinki added a project: Wikidata-Query-Service.
Restricted Application added a subscriber: Aklapper.

TASK DESCRIPTION
  (see also 
https://www.wikidata.org/wiki/Wikidata:Report_a_technical_problem/WDQS_and_Search#query_does_not_reflect_current_state_(not_even_yesterday's_state)
 )
  
  in short:  mountain (Q8502) is a subclass (P279 
<https://phabricator.wikimedia.org/P279>) of landform (Q271669). Querying for 
mountains thus should result in a subset of the corresponding query for all 
landforms (as any mountain also is a landform). This is not the case.
  
  caveat: the behaviour is not reproducible over long time spans, as after some 
days things seem to get synchronized again. But the time span is far beyond 
anything that could be explained by replication lags, different caching servers 
with non-sync caches, etc.
  
  **Steps to replicate the issue** (include links if applicable):
  
  - query for landforms: 
https://query.wikidata.org/sparql?query=%23defaultView%3AMap%7B%22hide%22%3A%22%3Frgb%22%7D%0ASELECT%20%3Fitem%20%3FitemLabel%20%3FitemDescription%20(GROUP_CONCAT(DISTINCT%20%3FwhereLabel%3B%20SEPARATOR%3D'%2C%20')%20AS%20%3FwhereLabels)%20(SAMPLE(%3Fimage)%20AS%20%3Fimage)%20%3Fcoord%20%3Frgb%20%3Flayer%20WITH%20%7B%0A%20%20SELECT%20DISTINCT%20%3Fitem%20WHERE%20%7B%0A%20%20%20%20%3Fitem%20wdt%3AP17%20wd%3AQ40%20.%0A%20%20%20%20%3Fitem%20wdt%3AP625%20%5B%5D%20.%0A%20%20%20%20%3Fitem%20wdt%3AP31%2Fwdt%3AP279*%20wd%3AQ271669%20.%20%23Q35145263%20.%20%23%20Q271669%20.%20%23%0A%0A%20%20%20%20%23%3Fitem%20wdt%3AP31%2Fwdt%3AP279*%20wd%3AQ35509%20.%0A%20%20%20%20minus%20%7B%3Fitem%20wdt%3AP31%2Fwdt%3AP279*%20wd%3AQ46831%20.%7D%0A%0A%20%20%20%20filter%20not%20exists%20%7B%0A%20%20%20%20%20%20%3Fitem%20wdt%3AP131%20%3Fwo%0A%20%20%20%20%20%20%7D%0A%20%20%23minus%20%7B%3Fitem%20wdt%3AP31%2Fwdt%3AP279*%20wd%3AQ27686%20.%7D%0A%20%20%23minus%20%7B%3Fitem%20wdt%3AP31%2Fwdt%3AP279*%20wd%3AQ1444%20.%7D%0A%20%20minus%20%7B%3Fitem%20wdt%3AP31%2Fwdt%3AP279*%20wd%3AQ39816%20.%7D%0A%20%20%7D%0A%7D%20AS%20%25subquery1%20WHERE%20%7B%0A%20%20INCLUDE%20%25subquery1%20.%0A%20%20%3Fitem%20wdt%3AP31%20%5B%5D%20.%0A%20%20%3Fitem%20p%3AP625%20%3FcoordStatement%20.%0A%20%20%3FcoordStatement%20ps%3AP625%20%3Fcoord%20.%0A%20%20%23MINUS%20%7B%20%3FcoordStatement%20prov%3AwasDerivedFrom%2Fpr%3AP143%20wd%3AQ169514%20%7D%20%23%20imported%20from%20Wikimedia%20project%3A%20Swedish%20Wikipedia%20%0A%20%20%23MINUS%20%7B%20%3FcoordStatement%20prov%3AwasDerivedFrom%2Fpr%3AP143%20wd%3AQ837615%20%7D%20%23%20imported%20from%20Wikimedia%20project%3A%20Cebuano%20Wikipedia%20%0A%20%20%23MINUS%20%7B%20%3FcoordStatement%20prov%3AwasDerivedFrom%2Fpr%3AP248%20wd%3AQ1194038%20%7D%20%23%20stated%20in%3A%20GEOnet%20Names%20Server%0A%20%20OPTIONAL%20%7B%0A%20%20%20%20%3Fitem%20wdt%3AP131%20%3Fwhere%20.%0A%20%20%20%20OPTIONAL%20%7B%0A%20%20%20%20%20%20%3Fwhere%20rdfs%3Alabel%20%3FwhereLiteral%20.%0A%20%20%20%20%20%20FILTER(LANG(%3FwhereLiteral)%20%3D%20'de')%20.%0A%20%20%20%20%7D%0A%20%20%7D%0A%20%20BIND(IF(BOUND(%3Fwhere)%2C%20IF(BOUND(%3FwhereLiteral)%2C%20%3FwhereLiteral%2C%20STRAFTER(STR(%3Fwhere)%2C%20'entity%2F'))%2C%20'no%20P131')%20AS%20%3FwhereLabel)%20.%0A%20%20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP18%20%3Fimage%20%7D%0A%20%20BIND(IF(EXISTS%20%7B%20%3Fitem%20p%3AP18%20%5B%5D%20%7D%2C%20'0000ff'%2C%20'ff0000')%20AS%20%3Frgb)%20.%0A%20%20BIND(IF(EXISTS%20%7B%20%3Fitem%20p%3AP18%20%5B%5D%20%7D%2C%20'With%20image'%2C%20'Without%20image')%20AS%20%3Flayer)%20.%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20'%5BAUTO_LANGUAGE%2Cde%2Cen%5D'%20%7D%0A%7D%20GROUP%20BY%20%3Fitem%20%3FitemLabel%20%3FitemDescription%20%3FwhereLabels%20%3Fcoord%20%3Frgb%20%3Flayer
  
  - query for mountains: 
https://query.wikidata.org/sparql?query=%23defaultView%3AMap%7B%22hide%22%3A%22%3Frgb%22%7D%0ASELECT%20%3Fitem%20%3FitemLabel%20%3FitemDescription%20(GROUP_CONCAT(DISTINCT%20%3FwhereLabel%3B%20SEPARATOR%3D'%2C%20')%20AS%20%3FwhereLabels)%20(SAMPLE(%3Fimage)%20AS%20%3Fimage)%20%3Fcoord%20%3Frgb%20%3Flayer%20WITH%20%7B%0A%20%20SELECT%20DISTINCT%20%3Fitem%20WHERE%20%7B%0A%20%20%20%20%3Fitem%20wdt%3AP17%20wd%3AQ40%20.%0A%20%20%20%20%3Fitem%20wdt%3AP625%20%5B%5D%20.%0A%20%20%20%20%3Fitem%20wdt%3AP31%2Fwdt%3AP279*%20wd%3AQ8502%20.%20%23Q35145263%20.%20%23%20Q271669%20.%20%23%0A%0A%20%20%20%20%23%3Fitem%20wdt%3AP31%2Fwdt%3AP279*%20wd%3AQ35509%20.%0A%20%20%20%20minus%20%7B%3Fitem%20wdt%3AP31%2Fwdt%3AP279*%20wd%3AQ46831%20.%7D%0A%0A%20%20%20%20filter%20not%20exists%20%7B%0A%20%20%20%20%20%20%3Fitem%20wdt%3AP131%20%3Fwo%0A%20%20%20%20%20%20%7D%0A%20%20%23minus%20%7B%3Fitem%20wdt%3AP31%2Fwdt%3AP279*%20wd%3AQ27686%20.%7D%0A%20%20%23minus%20%7B%3Fitem%20wdt%3AP31%2Fwdt%3AP279*%20wd%3AQ1444%20.%7D%0A%20%20minus%20%7B%3Fitem%20wdt%3AP31%2Fwdt%3AP279*%20wd%3AQ39816%20.%7D%0A%20%20%7D%0A%7D%20AS%20%25subquery1%20WHERE%20%7B%0A%20%20INCLUDE%20%25subquery1%20.%0A%20%20%3Fitem%20wdt%3AP31%20%5B%5D%20.%0A%20%20%3Fitem%20p%3AP625%20%3FcoordStatement%20.%0A%20%20%3FcoordStatement%20ps%3AP625%20%3Fcoord%20.%0A%20%20%23MINUS%20%7B%20%3FcoordStatement%20prov%3AwasDerivedFrom%2Fpr%3AP143%20wd%3AQ169514%20%7D%20%23%20imported%20from%20Wikimedia%20project%3A%20Swedish%20Wikipedia%20%0A%20%20%23MINUS%20%7B%20%3FcoordStatement%20prov%3AwasDerivedFrom%2Fpr%3AP143%20wd%3AQ837615%20%7D%20%23%20imported%20from%20Wikimedia%20project%3A%20Cebuano%20Wikipedia%20%0A%20%20%23MINUS%20%7B%20%3FcoordStatement%20prov%3AwasDerivedFrom%2Fpr%3AP248%20wd%3AQ1194038%20%7D%20%23%20stated%20in%3A%20GEOnet%20Names%20Server%0A%20%20OPTIONAL%20%7B%0A%20%20%20%20%3Fitem%20wdt%3AP131%20%3Fwhere%20.%0A%20%20%20%20OPTIONAL%20%7B%0A%20%20%20%20%20%20%3Fwhere%20rdfs%3Alabel%20%3FwhereLiteral%20.%0A%20%20%20%20%20%20FILTER(LANG(%3FwhereLiteral)%20%3D%20'de')%20.%0A%20%20%20%20%7D%0A%20%20%7D%0A%20%20BIND(IF(BOUND(%3Fwhere)%2C%20IF(BOUND(%3FwhereLiteral)%2C%20%3FwhereLiteral%2C%20STRAFTER(STR(%3Fwhere)%2C%20'entity%2F'))%2C%20'no%20P131')%20AS%20%3FwhereLabel)%20.%0A%20%20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP18%20%3Fimage%20%7D%0A%20%20BIND(IF(EXISTS%20%7B%20%3Fitem%20p%3AP18%20%5B%5D%20%7D%2C%20'0000ff'%2C%20'ff0000')%20AS%20%3Frgb)%20.%0A%20%20BIND(IF(EXISTS%20%7B%20%3Fitem%20p%3AP18%20%5B%5D%20%7D%2C%20'With%20image'%2C%20'Without%20image')%20AS%20%3Flayer)%20.%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20'%5BAUTO_LANGUAGE%2Cde%2Cen%5D'%20%7D%0A%7D%20GROUP%20BY%20%3Fitem%20%3FitemLabel%20%3FitemDescription%20%3FwhereLabels%20%3Fcoord%20%3Frgb%20%3Flayer
  
  **What happens?**:
  
  - the first query lists Östliche Praxmarerkarspitze  (Q67083874), while the 
second doesn't. The second is correct, as Q67083874 has P131 
<https://phabricator.wikimedia.org/P131> assigned (which is the main selection 
in the query above).
  - I did not manage to make queries more simple without losing the 
incriminated behaviour or getting timeouts, sorry.
  
  **What should have happened instead?**:
  the second result set should be a subset of the first result set. Or, a 
warning or an error message should be displayed in case of some internally 
recognized bad intermediate state in the processing of the query (e.g. timeouts 
for single steps in the algorithm).
  
  **as an overall consequence:**
  
  - you cannot trust in the results of wikidata queries in general.

TASK DETAIL
  https://phabricator.wikimedia.org/T350348

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Herzi.Pinki
Cc: Aklapper, dcausse, Herzi.Pinki, AWesterinen, Namenlos314, Gq86, 
Lucas_Werkmeister_WMDE, EBjune, merbst, Jonas, Xmlizer, jkroll, Wikidata-bugs, 
Jdouglas, aude, Tobias1984, Manybubbles
_______________________________________________
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org

Reply via email to