Skip to content

Enforced the behavior of queries to ressemble backend, by disallowing deduplication of results by SQLAlchemy#2281

Merged
sphuber merged 2 commits into
aiidateam:provenance_redesignfrom
lekah:fix_1600_qb-count_neq_len-qb-all
Dec 4, 2018
Merged

Enforced the behavior of queries to ressemble backend, by disallowing deduplication of results by SQLAlchemy#2281
sphuber merged 2 commits into
aiidateam:provenance_redesignfrom
lekah:fix_1600_qb-count_neq_len-qb-all

Conversation

@lekah
Copy link
Copy Markdown

@lekah lekah commented Dec 4, 2018

This resolves #1600, by forcing SQLAlchemy to not de-duplicate rows. Therefore, the backend (psql) behavior is more closely reproduced, and we have the following equality:

qb.count() == len(qb.all())

A test for this was added.

…Therefore, the backend (psql) behavior is more closely reproduced.
@lekah lekah requested a review from giovannipizzi December 4, 2018 08:57
Copy link
Copy Markdown
Member

@giovannipizzi giovannipizzi left a comment

Choose a reason for hiding this comment

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

Fantastic!

@sphuber sphuber merged commit 13dcc03 into aiidateam:provenance_redesign Dec 4, 2018
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.

3 participants