Repository navigation
Conversation
`= NULL` and `<> NULL` on a literal converted to the same filter as `IS NULL` and `IS NOT NULL`, so a comparison against the NULL literal wrongly matched a missing or present-NULL property. A comparison against NULL is always unknown, so it now never admits, for every property regardless of whether it is missing, holds NULL, or holds a value. IS NULL and IS NOT NULL convert through their own branch and keep their documented behavior. IN and NOT IN read a present NULL property, or a NULL list element, as a definite match. Both now follow the unknown rule: a present NULL property never admits either, and a NULL anywhere in the list excludes NOT IN outright, even when the property matches nothing else in that list. The missing-property rule for IN and NOT IN is unchanged.
NOT (w = NULL) and NOT (w <> NULL) admitted every edge unconditionally. never_admits() built the same Or(Vec::new()) shape a literal FALSE converts to, so the shared MetadataFilter::Not evaluator's plain boolean negation flipped it to true -- SQL's NOT UNKNOWN is UNKNOWN, not TRUE. never_admits() now returns Or(vec![Or(Vec::new())]), a shape convert()'s own Not arm recognizes and returns unchanged instead of wrapping, keeping it self-negating under any number of NOTs. The nested Or, not And: parse_edge_predicate flattens a top-level And into its own AND-ed clause list, which would have stripped an And-shaped marker exactly when the NULL comparison is the whole predicate. IN/NOT IN under NOT has a separate, pre-existing issue of the same general shape (NOT (w IN (1, NULL)) also mishandles NULL), not touched here: it does not go through never_admits() at all, and is a deeper problem in the shared In/NotIn match-time evaluator, not a clean regression this fix introduced.
This branch has not been deployed
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.
= NULLand<> NULLon a literal converted to the same filter asIS NULLandIS NOT NULL, so a comparison against the NULL literal wrongly matched a missing or present-NULL property. A comparison against NULL is always unknown, so it now never admits, for every property regardless of whether it is missing, holds NULL, or holds a value.IS NULLandIS NOT NULLconvert through their own branch and keep their documented behavior.INandNOT INread a present NULL property, or a NULL list element, as a definite match. Both now follow the unknown rule: a present NULL property never admits either, and a NULL anywhere in the list excludesNOT INoutright, even when the property matches nothing else in that list. The missing-property rule forINandNOT INis unchanged.