Repository navigation
fix: Predicate.And takes for a conjunct only what it wrote itself - #88
Merged
Merged
Conversation
Closes #83. Co-Authored-By: Claude Fable 5.2 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #83
Problem
Predicate.Andleft a predicate as it was when its text ended inAND (other): 5.x's rule for a convention that runs twice. A hand-written{A} OR {B} AND ({C})ends the same way and isA OR (B AND C). Adding{C}to it changed nothing, so the condition stayed wider than the one asked for and a constraint or a unique index covered rows it was told to leave out. Nothing failed. The translator parenthesises everyOR, so only a predicate written by hand reached it.Change
Andtakes for a conjunct only what it writes itself:(…) AND (other), where the first parenthesis closes right before theAND. Parentheses inside a quoted literal are not counted.One answer changes against 5.x: a hand-written
{A} IS NULL AND ({C}), which is a conjunction, now gets{C}added once more. Redundant, and correct.Tests
457 kernel and 64 PostgreSQL tests without a server. Six rows: three shapes that end like a conjunct and are none, and three with a parenthesis inside a literal, in both directions. What
Andwrote is still recognised three deep.Each guard shown to fail, in a scratch copy:
🤖 Generated with Claude Code