Add support for TOP before ALL/DISTINCT (#1495)

This commit is contained in:
Yoav Cohen 2024-11-06 18:09:55 +01:00 committed by GitHub
parent 05821cc7db
commit a5b0092506
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 67 additions and 7 deletions

View file

@ -114,6 +114,7 @@ fn parse_create_procedure() {
body: Box::new(SetExpr::Select(Box::new(Select {
distinct: None,
top: None,
top_before_distinct: false,
projection: vec![SelectItem::UnnamedExpr(Expr::Value(number("1")))],
into: None,
from: vec![],
@ -514,6 +515,7 @@ fn parse_substring_in_select() {
body: Box::new(SetExpr::Select(Box::new(Select {
distinct: Some(Distinct::Distinct),
top: None,
top_before_distinct: false,
projection: vec![SelectItem::UnnamedExpr(Expr::Substring {
expr: Box::new(Expr::Identifier(Ident {
value: "description".to_string(),