Repository navigation
Conversation
…laSQL#2590 Co-authored-by: gitranks[bot] <198371943+gitranks[bot]@users.noreply.github.com>
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 #2590 (item 1: INSERT stores NULL as NaN or 0).
INSERT INTO t VALUES (...)without a column list converted values forINT,FLOAT,NUMBERandMONEYcolumns with a bare+. That turned a NULL literal intoNaNand anullparameter into0. Because of this,IS NULL,COUNTandNOT NULLgave wrong results. The path with a column list already guards NULL with(x=value, x==undefined?undefined:+x). This PR uses the same guard in the path without a column list (one line insrc/70insert.js).Tests:
test/test2590.jscovers a NULL literal, anullparameter and a column list forINT,FLOAT,NUMBER,MONEYand for comparison types (INTEGER,DECIMAL,REAL,STRING,DATE). It also coversIS NULLandCOUNTon the stored value, the numeric conversion of non-NULL values, andNOT NULLbeing enforced (the case from the 2026-10-21 comment). Six of its tests fail without the fix. The full suite passes with it.Not in this PR:
CASTof a NULL still returns0ondevelop, because #2576 is not merged here. Item 2 (nullvsundefined) depends on the v5 decision in #2588. In a numeric column, anullparameter is now stored asundefined, the same as the column-list path already does.Made with GitRanks Contribute powered by Claude (Opus) · Reviewed and submitted by @maslianok
Something off? Tell us or opt out in one step — maintainers are always in control