mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Fixed parsing of NULL literal [#METR-19266].
This commit is contained in:
parent
3f678a3042
commit
18f0e83b51
@ -417,7 +417,7 @@ bool ParserCastExpression::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos & ma
|
||||
bool ParserNull::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos & max_parsed_pos, Expected & expected)
|
||||
{
|
||||
Pos begin = pos;
|
||||
ParserString nested_parser("NULL", true);
|
||||
ParserString nested_parser("NULL", true, true);
|
||||
if (nested_parser.parse(pos, end, node, max_parsed_pos, expected))
|
||||
{
|
||||
node = std::make_shared<ASTLiteral>(StringRange(StringRange(begin, pos)), Null());
|
||||
|
@ -0,0 +1,6 @@
|
||||
1
|
||||
1
|
||||
1
|
||||
0
|
||||
1
|
||||
0
|
6
dbms/tests/queries/0_stateless/00404_null_literal.sql
Normal file
6
dbms/tests/queries/0_stateless/00404_null_literal.sql
Normal file
@ -0,0 +1,6 @@
|
||||
SELECT NULL IS NULL;
|
||||
SELECT Null IS NULL;
|
||||
SELECT null is null;
|
||||
SELECT nuLL IS NOT NULL;
|
||||
SELECT NOT NULL IS NOT NULL;
|
||||
SELECT NOT NULL IS null;
|
Loading…
Reference in New Issue
Block a user