famewi created this task.
famewi added a project: Wikidata-Query-Service.
Herald added a subscriber: Aklapper.
Herald added projects: Wikidata, Discovery.

TASK DESCRIPTION

When joining on category items that are redirects, an invalid result set will be produced: Every item in the original result set will be combined with every item in the second graph.

Steps to reproduce:

  1. Use the categorymembers generator to perform a query on a category that contains at least one redirect. Ensure that the redirect item is part of the result set.
  2. Add a second graph to filter down the result set.

Expected result: Only the items that match both graphs are returned.
Actual result: In the result, every item of the first graph gets combined with every item of the second graph.

Example query:

SELECT *
WHERE {
  SERVICE wikibase:mwapi {
	 bd:serviceParam wikibase:api "Generator" .
     bd:serviceParam wikibase:endpoint "en.wikipedia.org" .
     bd:serviceParam mwapi:gcmpageid "24904747" .
     bd:serviceParam mwapi:generator "categorymembers" .
     bd:serviceParam mwapi:gcmprop "title" .

     # Here item 2 is a redirect. Lowering the limit to 1 will again produce the expected result.
     bd:serviceParam mwapi:gcmlimit "2" .

    ?title wikibase:apiOutputItem mwapi:title . 
    ?item wikibase:apiOutputItem mwapi:item .
  }
  ?item wdt:P625 ?location
}

Test data:


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

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

To: famewi
Cc: Wikidata, famewi, Aklapper, GoranSMilovanovic, QZanden, EBjune, merbst, Avner, debt, Gehel, Jonas, FloNight, Xmlizer, Izno, jkroll, Smalyshev, Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to