Repository navigation
[SQL] Produce a runtime error for NULL map keys - #8191
Draft
mihaibudiu wants to merge 1 commit into
Draft
mihaibudiu wants to merge 1 commit into
mihaibudiu wants to merge 1 commit into
Conversation
Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
Contributor
Author
|
We will merge this about a month after #8250 has been released to give customers time to adapt |
mihaibudiu
marked this pull request as draft
December 5, 2026 04:29
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.
This is a breaking change: attempting to insert a NULL key into a MAP produces a runtime error. Previously it was allowed.
(There's a compile-time error if we can detect this at compile-time).
m[NULL]always evaluates toNULL, like it used to.Note that even prior to this change declared
MAP<K, V>types did not support nullable keys. As a consequence, the "forbidden" map values could not be present in tables.One could however create at runtime
MAPvalues withNULLkeys. It was however impossible to retrieve the associated value, sincem[NULL]already evaluates toNULL.This brings the semantics in line with many other SQL engines, such as DuckDB, Spark, Clickhouse, Postgres, Presto, etc.
Also, Arrow cannot represent nullable keys in MAP types.
Checklist
Breaking Changes?
Mark if you think the answer is yes for any of these components: