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

Foreign object filter part of an _or set of filters doesn't seem to do anything #2571

Closed
fredcarle opened this issue Apr 30, 2024 · 0 comments · Fixed by #2573
Closed

Foreign object filter part of an _or set of filters doesn't seem to do anything #2571

fredcarle opened this issue Apr 30, 2024 · 0 comments · Fixed by #2573
Labels
bug Something isn't working
Milestone

Comments

@fredcarle
Copy link
Collaborator

With a query of the form:

query {
  Book (filter: {_or: [
    {title: {_ilike: "%Test3%"}},
    {author: {name: {_ilike: "%Test3%"}}},
    {subTitle: {_ilike: "%Test3%"}}
  ]}) {
    title
  }
}

The {author: {name: {_ilike: "%Test3%"}}} part of the filter doesn't seem to have any impact on the result. It seems like having this object filter inside an _or set doesn't work. The following does work however.

query {
  Book (filter: {author: {name: {_ilike: "%Test3%"}}}) {
    title
  }
}
@fredcarle fredcarle added the bug Something isn't working label Apr 30, 2024
@fredcarle fredcarle added this to the DefraDB v0.11 milestone Apr 30, 2024
fredcarle added a commit that referenced this issue May 1, 2024
## Relevant issue(s)

Resolves #2571

## Description

This PR adds a check post doc filtering in the fetcher to see if we need
to rely on the external conditions instead to ensure a valid filtering
operation. This is specially important when filtering with logical
operators `_and` and `_or`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant