mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-04 14:28:22 +00:00
Fix limit
in subqueries (#1899)
Some checks failed
license / Release Audit Tool (RAT) (push) Has been cancelled
Rust / codestyle (push) Has been cancelled
Rust / lint (push) Has been cancelled
Rust / benchmark-lint (push) Has been cancelled
Rust / compile (push) Has been cancelled
Rust / docs (push) Has been cancelled
Rust / compile-no-std (push) Has been cancelled
Rust / test (beta) (push) Has been cancelled
Rust / test (nightly) (push) Has been cancelled
Rust / test (stable) (push) Has been cancelled
Some checks failed
license / Release Audit Tool (RAT) (push) Has been cancelled
Rust / codestyle (push) Has been cancelled
Rust / lint (push) Has been cancelled
Rust / benchmark-lint (push) Has been cancelled
Rust / compile (push) Has been cancelled
Rust / docs (push) Has been cancelled
Rust / compile-no-std (push) Has been cancelled
Rust / test (beta) (push) Has been cancelled
Rust / test (nightly) (push) Has been cancelled
Rust / test (stable) (push) Has been cancelled
This commit is contained in:
parent
1d0dc7cdd8
commit
7865de015f
3 changed files with 11 additions and 4 deletions
|
@ -2225,7 +2225,7 @@ fn parse_in_subquery() {
|
|||
assert_eq!(
|
||||
Expr::InSubquery {
|
||||
expr: Box::new(Expr::Identifier(Ident::new("segment"))),
|
||||
subquery: verified_query("SELECT segm FROM bar").body,
|
||||
subquery: Box::new(verified_query("SELECT segm FROM bar")),
|
||||
negated: false,
|
||||
},
|
||||
select.selection.unwrap()
|
||||
|
@ -2239,7 +2239,9 @@ fn parse_in_union() {
|
|||
assert_eq!(
|
||||
Expr::InSubquery {
|
||||
expr: Box::new(Expr::Identifier(Ident::new("segment"))),
|
||||
subquery: verified_query("(SELECT segm FROM bar) UNION (SELECT segm FROM bar2)").body,
|
||||
subquery: Box::new(verified_query(
|
||||
"(SELECT segm FROM bar) UNION (SELECT segm FROM bar2)"
|
||||
)),
|
||||
negated: false,
|
||||
},
|
||||
select.selection.unwrap()
|
||||
|
@ -15303,6 +15305,11 @@ fn parse_return() {
|
|||
let _ = all_dialects().verified_stmt("RETURN 1");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_subquery_limit() {
|
||||
let _ = all_dialects().verified_stmt("SELECT t1_id, t1_name FROM t1 WHERE t1_id IN (SELECT t2_id FROM t2 WHERE t1_name = t2_name LIMIT 10)");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_open() {
|
||||
let open_cursor = "OPEN Employee_Cursor";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue