Skip to content

Conversation

bsbodden
Copy link
Collaborator

…tyStream

  • Add NegatedPredicate class to properly handle SearchFieldPredicate negation
  • Override negate() in BaseAbstractPredicate to preserve SearchFieldPredicate type
  • Fix ClassCastException in NotEqualPredicate.getValues() for single values
  • Add comprehensive tests for isMissing().negate() and notEq("") operations
  • Document missing field queries in EntityStream documentation

The issue occurred when isMissing().negate() was called, as it used Java's default Predicate.negate() which wrapped the predicate in a generic negation, losing the SearchFieldPredicate type needed for proper query generation. This caused the EntityStream to generate wildcard "*" queries instead of proper "-ismissing(@field)" queries.

Additionally fixed a ClassCastException in NotEqualPredicate when using notEq("") with single string values by properly checking if the value is already iterable before casting.

…tyStream

- Add NegatedPredicate class to properly handle SearchFieldPredicate negation
- Override negate() in BaseAbstractPredicate to preserve SearchFieldPredicate type
- Fix ClassCastException in NotEqualPredicate.getValues() for single values
- Add comprehensive tests for isMissing().negate() and notEq("") operations
- Document missing field queries in EntityStream documentation

The issue occurred when isMissing().negate() was called, as it used Java's default
Predicate.negate() which wrapped the predicate in a generic negation, losing the
SearchFieldPredicate type needed for proper query generation. This caused the
EntityStream to generate wildcard "*" queries instead of proper "-ismissing(@field)"
queries.

Additionally fixed a ClassCastException in NotEqualPredicate when using notEq("")
with single string values by properly checking if the value is already iterable
before casting.
@bsbodden bsbodden self-assigned this Sep 16, 2025
@bsbodden bsbodden merged commit a1a8d7f into redis:main Sep 16, 2025
1 check 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.

1 participant