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

Support fetch_page for post-filters #270

Closed
chrisrossi opened this issue Dec 9, 2019 · 0 comments · Fixed by #463
Closed

Support fetch_page for post-filters #270

chrisrossi opened this issue Dec 9, 2019 · 0 comments · Fixed by #463
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@chrisrossi
Copy link
Contributor

In investigating #254, I found another edge case with fetch_page, similar to #247.

The one use case for post-filters, currently, is querying repeated structured properties. For the reason this requires post-filtering, see the documentation for query.RepeatedStructuredPropertyPredicate.

Because we are filtering results from Datastore, we don't actually know how many usable results we'll get for any given Datastore query with limit and offset, so some iterating will be required to get enough results to fill a page. We should be able to use the cursors from Datastore, since unlike with Multiquery, there's still only one Datastore query in play. While less efficient than doing this for queries that don't have post-filters, this should be doable.

@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Dec 10, 2019
@chrisrossi chrisrossi added priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. and removed triage me I really want to be triaged. labels Dec 10, 2019
@cguardia cguardia added priority: p2 Moderately-important priority. Fix may not be included in next release. and removed priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. labels Jan 14, 2020
@cguardia cguardia self-assigned this Apr 27, 2020
@chrisrossi chrisrossi assigned chrisrossi and unassigned cguardia Jun 2, 2020
chrisrossi pushed a commit to chrisrossi/python-ndb that referenced this issue Jun 4, 2020
chrisrossi pushed a commit to chrisrossi/python-ndb that referenced this issue Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants