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

Release limit per dist #18

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

Conversation

1nickt
Copy link
Contributor

@1nickt 1nickt commented Dec 2, 2017

This PR is not to be merged; for review only.

@preaction As I've mentioned in IRC the technique of creating virtual "row numbers" with a subquery was not working, in the sense that it first assigned the sequence to releases, and then applied the other constraints. So a query for the most recent 4 releases of a dist, by_author X, might only return 3 results, if one of the most recent 4 releases were authored by Y.

This is solved in the case of by_author by passing that constraint into the sequence-generating sub-query, so only matching results are assigned a place in the sequence.

However, the same technique is not working for distmat (ie the maturity param), even though the SQL looks right.

I'm at a loss at the moment. And I start a new $job on Monday, and I have to do a bunch of boring admin work on a frikkin Drupal website I run for a club I'm in (sigh). So while I am not abandoning this issue, I wanted to post what I have so far so that if you have any time or desire, you can check it out and possibly even figure it out.

… other query params) and include same in the sequence-generating sub-query. This is working for by_author, but not for distmat (see failing test).
@preaction
Copy link
Member

This looks great. Thanks for the work you've done so far, and good luck in the new job. I'll try to take a look this week to see if I can break the impasse.

@preaction preaction force-pushed the master branch 2 times, most recently from 685ac04 to 22450a4 Compare April 30, 2019 00:50
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.

2 participants