Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sqlglot/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -5090,7 +5090,7 @@ def _parse_is(self, this: t.Optional[exp.Expression]) -> t.Optional[exp.Expressi
exp.JSON, **{"this": kind, "with": _with, "unique": unique}
)
else:
expression = self._parse_primary() or self._parse_null()
expression = self._parse_null() or self._parse_bitwise()
if not expression:
self._retreat(index)
return None
Expand Down
4 changes: 4 additions & 0 deletions tests/dialects/test_sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ def test_sqlite(self):
"ATTACH 'foo' || '.foo2' AS schema_name",
)
self.validate_identity("DETACH DATABASE schema_name", "DETACH schema_name")
self.validate_identity("SELECT * FROM t WHERE NULL IS y")
self.validate_identity(
"SELECT * FROM t WHERE NULL IS NOT y", "SELECT * FROM t WHERE NOT NULL IS y"
)

def test_strftime(self):
self.validate_identity("SELECT STRFTIME('%Y/%m/%d', 'now')")
Expand Down