Ported queries to be compatible with QLever#661
Conversation
Abbe98
left a comment
There was a problem hiding this comment.
Thank you so much for this work! Here are a few first notes.
| (wd:Q145 'United Kingdom' 'united-kingdom' 'Current content includes ministerial departments.' 'Scotland|scotland') | ||
| (wd:Q22 'Scotland' 'united-kingdom/scotland' 'Current content includes executive agencies, executive non-departmental public bodies, advisory non-departmental public bodies, non-ministerial offices,local authorities, NHS boards, courts, public corporations, tribunals, parole boards, King\'s printer, commissioners, ombudsmen, Health and social care partnerships and government of Scotland.' '') | ||
|
|
||
There was a problem hiding this comment.
Here and in a few other places new whitespace have been introduced.
| ?ws pq:P407 ?language . | ||
| FILTER (?language IN (?lang, wd:Q1860 )) | ||
| } | ||
| ?uri wdt:P856 ?website_ . |
There was a problem hiding this comment.
What are the intended changes here? The commit says it's related to SAMPLE but it does not seem to be?
There was a problem hiding this comment.
There is a timeout problem with the original query when it is being run with QLever (something to do with uri or lang). But with WDQS it outputs OK in 3197 ms
So I asked LLMs to find out what wrong and it changed some parts of the query structure so now it is able to run it in 3225 ms on QLever
I have not done enough due diligence to review AI change in this file so it may confuse people with how it breaks the whitespace and line ordering of the query (Sorry 😥)
There was a problem hiding this comment.
No worries, sounds like a interesting mystery for my review! :-)
| ?org wdt:P92 ?regulatoryTextItem . | ||
| ?regulatoryTextItem wdt:P953 ?regulatoryText ; | ||
| wdt:P1476 ?regulatoryTextTitle . | ||
| ?org wdt:P1313 ?position . |
There was a problem hiding this comment.
I changed this organization ?leadBy query logic because the former query had a weird bug on QLever where it would output a random QID item on the column instead of the correct position holder. This does not happen on WDQS but with this subquery logic change it would work on both WDQS and QLever
There was a problem hiding this comment.
Thank you, it could do with a code comment.
fenymufyd
left a comment
There was a problem hiding this comment.
reviewed all except countries.rq
|
Thank you @fenymufyd, I have some time scheduled for Govdirectory on Friday and will try to get a in depth review done! |
Added a comment to clarify the purpose of the OPTIONAL block.
|
I'm rather happy now with this now! I want to merge #655 first and then rebase this. Not sure if I will be able to get it over the finish line before/during Wikimania but I hope so. |
Description
I've ported all .rq query files to be compatible with QLever. I used LLM (Copilot) to do most of the tedious work but I've tested some samples of the queries manually on WQDS and QLever and it works on both services. I think it also made organization-optional.rq faster on QLever, about 5-8 sec per item.
Issue Reference
this should fix #498
Checklist
Please ensure the following before submitting the PR: