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

Fix issue with object id queries #1073

Merged
merged 2 commits into from
Aug 12, 2024
Merged

Fix issue with object id queries #1073

merged 2 commits into from
Aug 12, 2024

Conversation

Jake13f
Copy link
Contributor

@Jake13f Jake13f commented Aug 12, 2024

This resolves an issue where filtering for object ids using the objectIds query parameter with a layer definition applied that also filters for object ids doesn't return the expected results. The existing regex for filtering IN predicates was too lenient and captured the 2nd part of where clauses as well in the value capture group.

ex.

Where

properties->`OBJECTID` IN (148985057, 186921065, 1215860827, 1157475985, 713444784 ) AND properties->`OBJECTID` IN (713444784 )

Altered Value (Old Regex)

hashedObjectIdComparator(properties, geometry, '148985057,186921065,1215860827,1157475985,713444784)ANDproperties->`OBJECTID`IN(713444784', 'IN')=true

Altered Value (New Regex)

hashedObjectIdComparator(properties, geometry, '148985057,186921065,1215860827,1157475985,713444784', 'IN')=true AND hashedObjectIdComparator(properties, geometry, '713444784', 'IN')=true

This resolves an issue where filtering for object ids using the objectIds query parameter with a layer definition applied that also filters for object ids doesn't return the expected results.
Copy link

changeset-bot bot commented Aug 12, 2024

🦋 Changeset detected

Latest commit: 7d62d87

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@koopjs/winnow Patch
@koopjs/featureserver Patch
@koopjs/output-geoservices Patch
@koopjs/koop-core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@rgwozdz
Copy link
Member

rgwozdz commented Aug 12, 2024

Failed CI not due to tests, but some platform related error...possible due to PR originating from a fork.

Ran unit and e2e tests locally and all passed.

Excellent find @Jake13f; thanks very much for your contribution.

@rgwozdz rgwozdz merged commit 642ab7e into koopjs:master Aug 12, 2024
6 of 7 checks passed
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