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

An overall QueryHash needs to have the hash for ORDER BY closer to the front (before group by, having, etc) #48

Open
Aklakan opened this issue Nov 24, 2023 · 0 comments

Comments

@Aklakan
Copy link
Member

Aklakan commented Nov 24, 2023

Permutations of group by and projections (typically) have no impact on a result set (a binding does not have an order of variables), but a permutation of the order by clause changes the order of bindings.

Currently this query produces the following hash:

SELECT ?a COUNT(?b) FROM <http://dbpedia.org/sparql> FROM NAMED <urn:foo> { ?a ?b ?c } GROUP BY STR(?c) ?a ORDER BY DESC(?a) DESC(STR(?c)) LIMIT 10 OFFSET 2

Tjny8TXJKFa7hYkh6VBRiv_6S_tZn3Fm_vyP-JtwPFM/cm60CQ/AA/s/ReTPZw/MusTnQ/AA/AA/AQ/AA/ZjanBg3tcVCB7ffhA/AA/GrxMCookg6M/AA/AA/2+10

One of the members of AA/AA/AQ/AA is the lehmer code for permutation of the order by clause - it needs to be moved closer to the front.
(Another TODO is to write a documentation of the hashing itself)

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

No branches or pull requests

1 participant