| 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:
- 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.
- 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:
- https://en.wikipedia.org/wiki/Category:Monuments_to_composers (Q8640743)
- Page ID: 29118741
- Redirect: item 1 of 16
- https://en.wikipedia.org/wiki/Category:Obelisks_in_Canada (Q8691068)
- Page ID: 24904747
- Redirect: item 2 of 3
- Prepared query: http://tinyurl.com/y8js6upb
- https://en.wikipedia.org/wiki/Category:Obelisks_in_the_United_States (Q8691091)
- Page ID: 14498651
- item 21 of 38
TASK DETAIL
EMAIL PREFERENCES
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
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
