Skip to content

Preserve unconstrained placeholders in AndPredicate#and()#4090

Merged
normen662 merged 1 commit intoFoundationDB:mainfrom
RobertBrunel:and-tautologies
Apr 20, 2026
Merged

Preserve unconstrained placeholders in AndPredicate#and()#4090
normen662 merged 1 commit intoFoundationDB:mainfrom
RobertBrunel:and-tautologies

Conversation

@RobertBrunel
Copy link
Copy Markdown
Contributor

@RobertBrunel RobertBrunel commented Apr 16, 2026

This change fixes the conjuncts filter in and(). Previously, it silently removed unconstrained Placeholder instances from the resulting AndPredicate. Such placeholders are tautologies but must be kept for the index-matching machinery to work correctly. Removing them can cause incorrect or missed index matches.

Testing:

  • Regression test in QueryPredicateTest.java.

This fixes #4091.

@RobertBrunel RobertBrunel added the bug fix Change that fixes a bug label Apr 16, 2026
@RobertBrunel RobertBrunel self-assigned this Apr 16, 2026
@RobertBrunel RobertBrunel marked this pull request as draft April 16, 2026 16:24
@RobertBrunel RobertBrunel requested a review from normen662 April 16, 2026 16:24
@RobertBrunel RobertBrunel force-pushed the and-tautologies branch 2 times, most recently from e343793 to a2c5f50 Compare April 16, 2026 16:45
@RobertBrunel RobertBrunel marked this pull request as ready for review April 16, 2026 17:23
This change fixes the conjuncts filter in `and()`. Previously, it
silently removed unconstrained `Placeholder` instances from the
resulting `AndPredicate`. Such placeholders are tautologies but
must be kept for the index-matching machinery to work correctly.
Removing them can cause incorrect or missed index matches.

Testing:
* Regression test in `QueryPredicateTest.java`.

This fixes FoundationDB#4091.
@normen662 normen662 merged commit 6fba046 into FoundationDB:main Apr 20, 2026
13 checks passed
@RobertBrunel RobertBrunel deleted the and-tautologies branch April 20, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug fix Change that fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AndPredicate#and() drops unconstrained placeholders

2 participants