mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-31 03:07:20 +00:00
ANY
and ALL
contains their operators (#963)
This commit is contained in:
parent
b02c3f87ec
commit
e0afd4b179
3 changed files with 52 additions and 20 deletions
|
@ -1558,10 +1558,10 @@ fn parse_bitwise_ops() {
|
|||
fn parse_binary_any() {
|
||||
let select = verified_only_select("SELECT a = ANY(b)");
|
||||
assert_eq!(
|
||||
SelectItem::UnnamedExpr(Expr::BinaryOp {
|
||||
SelectItem::UnnamedExpr(Expr::AnyOp {
|
||||
left: Box::new(Expr::Identifier(Ident::new("a"))),
|
||||
op: BinaryOperator::Eq,
|
||||
right: Box::new(Expr::AnyOp(Box::new(Expr::Identifier(Ident::new("b"))))),
|
||||
compare_op: BinaryOperator::Eq,
|
||||
right: Box::new(Expr::Identifier(Ident::new("b"))),
|
||||
}),
|
||||
select.projection[0]
|
||||
);
|
||||
|
@ -1571,10 +1571,10 @@ fn parse_binary_any() {
|
|||
fn parse_binary_all() {
|
||||
let select = verified_only_select("SELECT a = ALL(b)");
|
||||
assert_eq!(
|
||||
SelectItem::UnnamedExpr(Expr::BinaryOp {
|
||||
SelectItem::UnnamedExpr(Expr::AllOp {
|
||||
left: Box::new(Expr::Identifier(Ident::new("a"))),
|
||||
op: BinaryOperator::Eq,
|
||||
right: Box::new(Expr::AllOp(Box::new(Expr::Identifier(Ident::new("b"))))),
|
||||
compare_op: BinaryOperator::Eq,
|
||||
right: Box::new(Expr::Identifier(Ident::new("b"))),
|
||||
}),
|
||||
select.projection[0]
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue