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

Add support for partial SQL and partial post filtering in WhereBuilder #685

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MrSnyder
Copy link
Contributor

Prior to this patch, the WhereBuilder would either map a complete filter to a WHERE clause or (in case some parts of the filter are unmappable) use an empty WHERE clause and offer the complete filter for in-memory filtering.

A shortcoming of this approach is that a single unmappable part of a filter means that all objects will be be fetched from the database and will be filtered in memory. Depending on the structure of the filter, this can be improved, so the WHERE-clause can still be used to narrow the result set.

After this patch, the WhereBuilder supports partial SQL and partial in-memory filtering for a common use case: If the filter is based on a root AND operator, the filter will be split into a WHERE clause and a post filter part. The WHERE clause contains all mappable parts and the post filter the remaining parts.

Tests included.

… of an AND-based filter can be mapped to the database.
@MrSnyder MrSnyder added the enhancement enhancement or improvement label Feb 28, 2016
@MrSnyder MrSnyder added this to the 3.4 milestone Feb 28, 2016
@tfr42 tfr42 modified the milestones: 3.4, 3.4.1 Apr 6, 2018
@tfr42 tfr42 modified the milestones: 3.4.1, 3.5 Jun 18, 2018
@copierrj
Copy link
Member

The TMC discussed this pull requests and we like this approach. We are however somewhat hesitant to merge this right now because we very much like this new behavior to be opt-in instead to the new default behavior. Adding a configuration setting for this would be a great improvement to this pull request.

@tfr42 tfr42 added contributions welcome asking for contribution (time and money sponsor) needs discussion labels Jul 5, 2019
@tfr42 tfr42 added stuck stuck and removed needs discussion labels Jan 10, 2020
@tfr42 tfr42 added the WFS deegree Web Feature Service label Dec 1, 2021
@tfr42 tfr42 added the needs rebase PR is not up to date and needs rebase label May 16, 2022
@tfr42 tfr42 modified the milestones: 3.5, Backlog Jun 3, 2022
@tfr42 tfr42 added the CI failing CI build job fails label Aug 10, 2022
@tfr42 tfr42 changed the title WhereBuilder: Partial SQL and partial post filtering Add support for partial SQL and partial post filtering in WhereBuilder Dec 9, 2022
@tfr42 tfr42 added marked for deletion PR with that label will be closed soon and removed contributions welcome asking for contribution (time and money sponsor) labels Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI failing CI build job fails enhancement enhancement or improvement marked for deletion PR with that label will be closed soon needs rebase PR is not up to date and needs rebase stuck stuck WFS deegree Web Feature Service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants