mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-31 03:07:20 +00:00
Support DISTINCT ON (...)
(#852)
* Support "DISTINCT ON (...)" * a test * fix the merge
This commit is contained in:
parent
f72e2ec382
commit
3b1076c194
7 changed files with 96 additions and 31 deletions
|
@ -445,7 +445,7 @@ fn parse_quote_identifiers_2() {
|
|||
Statement::Query(Box::new(Query {
|
||||
with: None,
|
||||
body: Box::new(SetExpr::Select(Box::new(Select {
|
||||
distinct: false,
|
||||
distinct: None,
|
||||
top: None,
|
||||
projection: vec![SelectItem::UnnamedExpr(Expr::Identifier(Ident {
|
||||
value: "quoted ` identifier".into(),
|
||||
|
@ -479,7 +479,7 @@ fn parse_quote_identifiers_3() {
|
|||
Statement::Query(Box::new(Query {
|
||||
with: None,
|
||||
body: Box::new(SetExpr::Select(Box::new(Select {
|
||||
distinct: false,
|
||||
distinct: None,
|
||||
top: None,
|
||||
projection: vec![SelectItem::UnnamedExpr(Expr::Identifier(Ident {
|
||||
value: "`quoted identifier`".into(),
|
||||
|
@ -857,7 +857,7 @@ fn parse_select_with_numeric_prefix_column_name() {
|
|||
assert_eq!(
|
||||
q.body,
|
||||
Box::new(SetExpr::Select(Box::new(Select {
|
||||
distinct: false,
|
||||
distinct: None,
|
||||
top: None,
|
||||
projection: vec![SelectItem::UnnamedExpr(Expr::Identifier(Ident::new(
|
||||
"123col_$@123abc"
|
||||
|
@ -896,7 +896,7 @@ fn parse_select_with_concatenation_of_exp_number_and_numeric_prefix_column() {
|
|||
assert_eq!(
|
||||
q.body,
|
||||
Box::new(SetExpr::Select(Box::new(Select {
|
||||
distinct: false,
|
||||
distinct: None,
|
||||
top: None,
|
||||
projection: vec![
|
||||
SelectItem::UnnamedExpr(Expr::Value(Value::Number(
|
||||
|
@ -1075,7 +1075,7 @@ fn parse_substring_in_select() {
|
|||
Box::new(Query {
|
||||
with: None,
|
||||
body: Box::new(SetExpr::Select(Box::new(Select {
|
||||
distinct: true,
|
||||
distinct: Some(Distinct::Distinct),
|
||||
top: None,
|
||||
projection: vec![SelectItem::UnnamedExpr(Expr::Substring {
|
||||
expr: Box::new(Expr::Identifier(Ident {
|
||||
|
@ -1372,7 +1372,7 @@ fn parse_hex_string_introducer() {
|
|||
Statement::Query(Box::new(Query {
|
||||
with: None,
|
||||
body: Box::new(SetExpr::Select(Box::new(Select {
|
||||
distinct: false,
|
||||
distinct: None,
|
||||
top: None,
|
||||
projection: vec![SelectItem::UnnamedExpr(Expr::IntroducedString {
|
||||
introducer: "_latin1".to_string(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue