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

In nin array subdoc #737

Merged
merged 21 commits into from
Dec 19, 2023
Merged

In nin array subdoc #737

merged 21 commits into from
Dec 19, 2023

Conversation

Yuqi-Du
Copy link
Contributor

@Yuqi-Du Yuqi-Du commented Dec 14, 2023

What this PR does:
support $in and $nin for array and sub_doc

{
  "find": {
   "filter" : {"array_field": {"$in" : [["A", "B", "C"], ["X", "Y", "Z"]] } }
  }
}
{
  "find": {
   "filter" : {"sub_doc_field": {"$in" : [ { "A" : "B" }] } }
  }
}

Which issue(s) this PR fixes:
Fixes 732

Checklist

  • Changes manually tested
  • Automated Tests added/updated
  • Documentation added/updated
  • CLA Signed: DataStax CLA

(need v2.1 release)
IT will fail, since IT relies on cassandra backend with no support for not operator
(many corners cases)
…a_not_operator

# Conflicts:
#	src/main/java/io/stargate/sgv2/jsonapi/api/model/command/clause/filter/ValueComparisonOperator.java
#	src/main/java/io/stargate/sgv2/jsonapi/service/operation/model/impl/DBFilterBase.java
add tests
# Conflicts:
#	src/main/java/io/stargate/sgv2/jsonapi/service/operation/model/impl/DBFilterBase.java
#	src/test/java/io/stargate/sgv2/jsonapi/api/v1/InAndNinIntegrationTest.java
@Yuqi-Du Yuqi-Du requested a review from a team as a code owner December 14, 2023 20:57
Copy link
Collaborator

@vkarpov15 vkarpov15 left a comment

Choose a reason for hiding this comment

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

One minor comment but LGTM overall

Copy link
Contributor

@Hazel-Datastax Hazel-Datastax left a comment

Choose a reason for hiding this comment

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

LGTM

@Yuqi-Du Yuqi-Du merged commit ce3f677 into main Dec 19, 2023
3 checks passed
@Yuqi-Du Yuqi-Du deleted the in_nin_array_subdoc branch December 19, 2023 00:22
Copy link
Collaborator

@vkarpov15 vkarpov15 left a comment

Choose a reason for hiding this comment

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

LGTM

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.

$in and $nin, support for array and subdoc
4 participants