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

Catalog queries incorrectly restrict to a single station_number #10

Closed
nmclrn opened this issue Sep 17, 2019 · 1 comment
Closed

Catalog queries incorrectly restrict to a single station_number #10

nmclrn opened this issue Sep 17, 2019 · 1 comment

Comments

@nmclrn
Copy link

nmclrn commented Sep 17, 2019

The catalog queries all make use of the following subquery:

     JOIN (SELECT
                Station.station_num as station_num,
                Station.user as station_user,
                Observer.id as obs_id,
                Observer.eth_addr as eth_addr,
                Observer.name as user_name
                FROM Station,Observer
                WHERE Station.user = Observer.id
                LIMIT 1) Obs ON ParsedIOD.station_number = Obs.station_num

I think the LIMIT 1 here is a bug. It has the effect of limiting the whole catalog result set to a single station number (on my DB, ParsedIOD.station_number = 2420), which I don’t think is what we want. I believe I’ve inadvertently fixed some cases as part of query optimization, but other cases need attention.

@nmclrn nmclrn transferred this issue from another repository Sep 30, 2019
Kmoneal pushed a commit that referenced this issue Sep 30, 2019
nmclrn pushed a commit that referenced this issue Oct 1, 2019
…ne result per object.

Addresses #11 and #10 for only the `latest` variant of the catalog query.

Also use a modular form of catalog query construction, which we will copy for the other catalog queries.
nmclrn pushed a commit that referenced this issue Oct 1, 2019
…pefully) correct, with only one result per object.

Addresses #7 and #10.

Also refactor `/catalog/priorities`.

All of the aforemetnioned queries now use a modular form of catalog query construction, which we will copy for the other catalog queries.
nmclrn pushed a commit that referenced this issue Oct 1, 2019
…result per object.

Addresses #11 and #10 for only the `all` variant of the catalog query.

Also use a modular form of catalog query construction.
@nmclrn nmclrn mentioned this issue Oct 1, 2019
Kmoneal pushed a commit that referenced this issue Oct 2, 2019
…ne result per object.

Addresses #11 and #10 for only the `latest` variant of the catalog query.

Also use a modular form of catalog query construction, which we will copy for the other catalog queries.
Kmoneal pushed a commit that referenced this issue Oct 2, 2019
…pefully) correct, with only one result per object.

Addresses #7 and #10.

Also refactor `/catalog/priorities`.

All of the aforemetnioned queries now use a modular form of catalog query construction, which we will copy for the other catalog queries.
Kmoneal pushed a commit that referenced this issue Oct 2, 2019
…result per object.

Addresses #11 and #10 for only the `all` variant of the catalog query.

Also use a modular form of catalog query construction.
@nmclrn
Copy link
Author

nmclrn commented Oct 3, 2019

Fixed by #18

@nmclrn nmclrn closed this as completed Oct 3, 2019
Kmoneal pushed a commit that referenced this issue Oct 21, 2019
Kmoneal pushed a commit that referenced this issue Oct 21, 2019
…ne result per object.

Addresses #11 and #10 for only the `latest` variant of the catalog query.

Also use a modular form of catalog query construction, which we will copy for the other catalog queries.
Kmoneal pushed a commit that referenced this issue Oct 21, 2019
…pefully) correct, with only one result per object.

Addresses #7 and #10.

Also refactor `/catalog/priorities`.

All of the aforemetnioned queries now use a modular form of catalog query construction, which we will copy for the other catalog queries.
Kmoneal pushed a commit that referenced this issue Oct 21, 2019
…result per object.

Addresses #11 and #10 for only the `all` variant of the catalog query.

Also use a modular form of catalog query construction.
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