Repository navigation
Conversation
`col = NULL` matches no row. The lookup rewrite took the NULL literal as the key "" and returned rows holding an empty string. The equality now stays a filter, so the scan path decides it.
A comparison with a NULL literal is unknown. The indexed equality, the scan filter, the columnar mask, the scan-side filter and the vector prefilter treat it as never matching. A NULL key plans no point lookup, and its fallback filter never matches, so UPDATE and DELETE leave a row with a NULL key alone.
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.
col = NULLmatches no row, in reads and in DML.The index lookup rewrite took the NULL literal as the key
"", and a point key did the same. A plain fallback to a scan is not enough, because the scan filter matches a stored NULL against a NULL literal. A comparison with a NULL literal now never matches on the fallback paths.What changed
UPDATEandDELETEby a NULL key leave the row with a NULL key alone.INlist drops its NULL members. A list of only NULL matches no row.Behaviour on
document_strictanddocument_schemalessWHERE tag = NULL,WHERE NULL = tag, indexed or notWHERE id = 'b' AND tag = NULLDELETE ... WHERE tag = NULLOn a schemaless collection with no declared primary key:
WHERE id = NULLUPDATE ... WHERE id IN ('a', NULL)achangesDELETE ... WHERE id = NULLChecks
main.Not run: full wire suite,
dml_suite,common_suite. Not probed over pgwire: KV, columnar and timeseries, and the HTTP, WebSocket and native routes.