Repository navigation
SQLite, PostgreSQL, DuckDB: Print postfix NOT NULL, NOTNULL and ISNULL as written - #3028
Open
LucaCappelletti94 wants to merge 1 commit into
Open
LucaCappelletti94 wants to merge 1 commit into
LucaCappelletti94 wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## postfix-isnull-operator #3028 +/- ##
===========================================================
+ Coverage 83.54% 83.56% +0.01%
===========================================================
Files 42 42
Lines 35682 35706 +24
Branches 35682 35706 +24
===========================================================
+ Hits 29812 29836 +24
Misses 2432 2432
Partials 3438 3438 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
LucaCappelletti94
force-pushed
the
upstream/null-test-spelling
branch
from
November 21, 2026 17:18
9ce12a9 to
c0a0f32
Compare
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.
Postfix
a NOT NULL + 1means(a NOT NULL) + 1in SQLite, but sqlparser printed it asa IS NOT NULL + 1. SQLite parsesIS NOTas a binary operator that binds looser than+, so it reads that text asa IS NOT (NULL + 1). Whenais NULL the input gives 1 and the printed text gives 0.Expr::IsNullandExpr::IsNotNulldo not remember how they were written, soDisplayhas no way to choose.Both become struct variants whose
syntaxfield recordsIS NULL,ISNULL,IS NOT NULL,NOT NULLorNOTNULL, and they print back as written.