Skip to content

Commit 7beb51e

Browse files
committed
not is not binary operator
1 parent b88c45a commit 7beb51e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

mindsdb_sql_parser/parser.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1642,7 +1642,6 @@ def star(self, p):
16421642
'expr AND expr',
16431643
'expr OR expr',
16441644
'expr IS_NOT expr',
1645-
'expr NOT expr',
16461645
'expr IS expr',
16471646
'expr LIKE expr',
16481647
'expr NOT_LIKE expr',

tests/test_base_sql/test_select_operations.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import pytest
22

3-
from mindsdb_sql_parser import parse_sql
3+
from mindsdb_sql_parser import parse_sql, ParsingException
44
from mindsdb_sql_parser.ast import *
55

66

@@ -635,3 +635,8 @@ def test_exits(self):
635635
)
636636

637637
assert str(ast) == str(expected_ast)
638+
639+
def test_not(self):
640+
sql = 'SELECT * from movies where genre not null'
641+
with pytest.raises(ParsingException):
642+
parse_sql(sql)

0 commit comments

Comments
 (0)