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 array intersects function #257

Merged
merged 7 commits into from
Nov 4, 2024
Merged

Add array intersects function #257

merged 7 commits into from
Nov 4, 2024

Conversation

j33ty
Copy link
Contributor

@j33ty j33ty commented Aug 21, 2024

Add a new function array::intersects() which returns true/false if some of the strings in the argument array intersect.

@j33ty j33ty self-assigned this Aug 21, 2024
@j33ty j33ty changed the base branch from main to bump-up-groq-test-suite-version August 21, 2024 14:45
Base automatically changed from bump-up-groq-test-suite-version to main August 21, 2024 16:46
@j33ty j33ty force-pushed the cldx-2230 branch 2 times, most recently from 8bd3bb8 to 1a89826 Compare August 22, 2024 14:03
@j33ty j33ty requested a review from a team August 22, 2024 14:03
@j33ty
Copy link
Contributor Author

j33ty commented Aug 22, 2024

Tests are failing here because groq-test-suite is using geo data type in array::intersects() function without gating these tests behind geoFunctions feature. GROQ JS does not seem to support geo data type and geo functions.

  1. https://github.com/sanity-io/groq-test-suite/pull/80/files#diff-9281d464e6eb3b49a5eb063cdc52d17e81f1f2900e73d1358396115e0bf7e1c0R16
  2. const SUPPORTED_FEATURES = new Set(['portableText'])
  3. https://github.com/sanity-io/groq-test-suite/blob/main/test/function/geo/geo.yml#L3

Copy link
Member

@atombender atombender left a comment

Choose a reason for hiding this comment

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

LGTM!

@atombender
Copy link
Member

without gating these tests behind geoFunctions feature

That's an oversight, yes.

@j33ty
Copy link
Contributor Author

j33ty commented Aug 28, 2024

PR sanity-io/groq-test-suite#85 fixes the geoFunctions feature on geo data type.

@j33ty j33ty enabled auto-merge (rebase) November 1, 2024 01:48
@j33ty j33ty requested a review from atombender November 1, 2024 01:48
Copy link
Member

@atombender atombender left a comment

Choose a reason for hiding this comment

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

LGTM!

@j33ty j33ty merged commit 7f57a91 into main Nov 4, 2024
8 checks passed
@j33ty j33ty deleted the cldx-2230 branch November 4, 2024 10:15
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