Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

queries: harmonize work type detection #331

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

maxlath
Copy link
Member

@maxlath maxlath commented Nov 7, 2019

hypothesis of this PR: using VALUES allows to more easily see the pattern than making those lenghtly UNIONs

@maxlath maxlath requested a review from jum-s November 7, 2019 08:42
Copy link
Contributor

@jum-s jum-s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unsure if its more readable, this VALUES in SPARQL is new to us but it does not make it more readable for everyone. I would claim UNION is more explicit as its used in many SQL implementations

server/data/wikidata/queries/works_reverse_claims.coffee Outdated Show resolved Hide resolved
@maxlath maxlath force-pushed the harmonize-sparql-queries-work-type-detection branch from 3757e10 to befb87f Compare November 9, 2019 21:48
@maxlath maxlath force-pushed the harmonize-sparql-queries-work-type-detection branch from befb87f to cd24dd3 Compare January 11, 2020 11:11
@maxlath
Copy link
Member Author

maxlath commented Jan 11, 2020

I rewrote the commit for the post-decaffeinate era

@maxlath maxlath force-pushed the harmonize-sparql-queries-work-type-detection branch from cd24dd3 to 1f71962 Compare April 12, 2020 14:22
@maxlath maxlath force-pushed the master branch 3 times, most recently from c8f6481 to b0a9869 Compare May 22, 2020 20:37
re-commit of 107218f post-decaffeinate
trying to make it more readable

re-commit of 04397e4 post-decaffeinate
outside of the built query to avoid sending unnecessary long queries

re-commit of befb87f post-decaffeinate
@maxlath maxlath force-pushed the harmonize-sparql-queries-work-type-detection branch from 1f71962 to 0054009 Compare August 30, 2020 10:43
@maxlath
Copy link
Member Author

maxlath commented Aug 30, 2020

on the VALUES version UNION syntax debate: I now generally prefer the VALUES syntax, as, when you are familiar with it, it is much more explicit on what is happening than when you have to inspect all UNION clauses to then figure out that it is the exact same pattern repeating. This would then allow UNION to be used as a way to highlight that there is a diversity of patterns being combined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants