Skip to content

Commit 5c7ff79

Browse files
committed
Add a test for parsing the NULL literal
(Coveralls notices we didn't have one.)
1 parent 45c9aa1 commit 5c7ff79

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/sqlparser_common.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,16 @@ fn parse_projection_nested_type() {
401401
//TODO: add assertions
402402
}
403403

404+
#[test]
405+
fn parse_null_in_select() {
406+
let sql = "SELECT NULL";
407+
let select = verified_only_select(sql);
408+
assert_eq!(
409+
&ASTNode::SQLValue(Value::Null),
410+
expr_from_projection(only(&select.projection)),
411+
);
412+
}
413+
404414
#[test]
405415
fn parse_escaped_single_quote_string_predicate() {
406416
use self::ASTNode::*;

0 commit comments

Comments
 (0)