mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-29 02:14:07 +00:00
Implement is [not] distinct from (#361)
* Implement is [not] distinct from * Simplify message * Clippy
This commit is contained in:
parent
c9f8a44b55
commit
0f0b327e97
4 changed files with 47 additions and 7 deletions
|
@ -586,6 +586,31 @@ fn parse_is_not_null() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_is_distinct_from() {
|
||||
use self::Expr::*;
|
||||
let sql = "a IS DISTINCT FROM b";
|
||||
assert_eq!(
|
||||
IsDistinctFrom(
|
||||
Box::new(Identifier(Ident::new("a"))),
|
||||
Box::new(Identifier(Ident::new("b")))
|
||||
),
|
||||
verified_expr(sql)
|
||||
);
|
||||
}
|
||||
#[test]
|
||||
fn parse_is_not_distinct_from() {
|
||||
use self::Expr::*;
|
||||
let sql = "a IS NOT DISTINCT FROM b";
|
||||
assert_eq!(
|
||||
IsNotDistinctFrom(
|
||||
Box::new(Identifier(Ident::new("a"))),
|
||||
Box::new(Identifier(Ident::new("b")))
|
||||
),
|
||||
verified_expr(sql)
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_not_precedence() {
|
||||
// NOT has higher precedence than OR/AND, so the following must parse as (NOT true) OR true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue