mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-07-07 17:04:59 +00:00
feat: support INSERT INTO [TABLE] FUNCTION
of Clickhouse (#1633)
Co-authored-by: Kermit <chenjiawei1@xiaohongshu.com> Co-authored-by: Ifeanyi Ubah <ify1992@yahoo.com>
This commit is contained in:
parent
c54ba4dc41
commit
b09514e492
11 changed files with 147 additions and 53 deletions
|
@ -1725,7 +1725,7 @@ fn parse_prepare() {
|
|||
};
|
||||
match sub_stmt.as_ref() {
|
||||
Statement::Insert(Insert {
|
||||
table_name,
|
||||
table: table_name,
|
||||
columns,
|
||||
source: Some(source),
|
||||
..
|
||||
|
@ -4381,11 +4381,11 @@ fn test_simple_postgres_insert_with_alias() {
|
|||
or: None,
|
||||
ignore: false,
|
||||
into: true,
|
||||
table_name: ObjectName(vec![Ident {
|
||||
table: TableObject::TableName(ObjectName(vec![Ident {
|
||||
value: "test_tables".to_string(),
|
||||
quote_style: None,
|
||||
span: Span::empty(),
|
||||
}]),
|
||||
}])),
|
||||
table_alias: Some(Ident {
|
||||
value: "test_table".to_string(),
|
||||
quote_style: None,
|
||||
|
@ -4426,7 +4426,7 @@ fn test_simple_postgres_insert_with_alias() {
|
|||
assignments: vec![],
|
||||
partitioned: None,
|
||||
after_columns: vec![],
|
||||
table: false,
|
||||
has_table_keyword: false,
|
||||
on: None,
|
||||
returning: None,
|
||||
replace_into: false,
|
||||
|
@ -4449,11 +4449,11 @@ fn test_simple_postgres_insert_with_alias() {
|
|||
or: None,
|
||||
ignore: false,
|
||||
into: true,
|
||||
table_name: ObjectName(vec![Ident {
|
||||
table: TableObject::TableName(ObjectName(vec![Ident {
|
||||
value: "test_tables".to_string(),
|
||||
quote_style: None,
|
||||
span: Span::empty(),
|
||||
}]),
|
||||
}])),
|
||||
table_alias: Some(Ident {
|
||||
value: "test_table".to_string(),
|
||||
quote_style: None,
|
||||
|
@ -4497,7 +4497,7 @@ fn test_simple_postgres_insert_with_alias() {
|
|||
assignments: vec![],
|
||||
partitioned: None,
|
||||
after_columns: vec![],
|
||||
table: false,
|
||||
has_table_keyword: false,
|
||||
on: None,
|
||||
returning: None,
|
||||
replace_into: false,
|
||||
|
@ -4519,11 +4519,11 @@ fn test_simple_insert_with_quoted_alias() {
|
|||
or: None,
|
||||
ignore: false,
|
||||
into: true,
|
||||
table_name: ObjectName(vec![Ident {
|
||||
table: TableObject::TableName(ObjectName(vec![Ident {
|
||||
value: "test_tables".to_string(),
|
||||
quote_style: None,
|
||||
span: Span::empty(),
|
||||
}]),
|
||||
}])),
|
||||
table_alias: Some(Ident {
|
||||
value: "Test_Table".to_string(),
|
||||
quote_style: Some('"'),
|
||||
|
@ -4564,7 +4564,7 @@ fn test_simple_insert_with_quoted_alias() {
|
|||
assignments: vec![],
|
||||
partitioned: None,
|
||||
after_columns: vec![],
|
||||
table: false,
|
||||
has_table_keyword: false,
|
||||
on: None,
|
||||
returning: None,
|
||||
replace_into: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue