Add support for ODBC functions (#1585)

This commit is contained in:
Ifeanyi Ubah 2024-12-11 23:31:55 +01:00 committed by GitHub
parent 04271b0e4e
commit a13f8c6b93
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 142 additions and 6 deletions

View file

@ -199,6 +199,7 @@ fn parse_delimited_identifiers() {
assert_eq!(
&Expr::Function(Function {
name: ObjectName(vec![Ident::with_quote('"', "myfun")]),
uses_odbc_syntax: false,
parameters: FunctionArguments::None,
args: FunctionArguments::List(FunctionArgumentList {
duplicate_treatment: None,
@ -821,6 +822,7 @@ fn parse_create_table_with_variant_default_expressions() {
name: None,
option: ColumnOption::Materialized(Expr::Function(Function {
name: ObjectName(vec![Ident::new("now")]),
uses_odbc_syntax: false,
args: FunctionArguments::List(FunctionArgumentList {
args: vec![],
duplicate_treatment: None,
@ -842,6 +844,7 @@ fn parse_create_table_with_variant_default_expressions() {
name: None,
option: ColumnOption::Ephemeral(Some(Expr::Function(Function {
name: ObjectName(vec![Ident::new("now")]),
uses_odbc_syntax: false,
args: FunctionArguments::List(FunctionArgumentList {
args: vec![],
duplicate_treatment: None,
@ -872,6 +875,7 @@ fn parse_create_table_with_variant_default_expressions() {
name: None,
option: ColumnOption::Alias(Expr::Function(Function {
name: ObjectName(vec![Ident::new("toString")]),
uses_odbc_syntax: false,
args: FunctionArguments::List(FunctionArgumentList {
args: vec![FunctionArg::Unnamed(FunctionArgExpr::Expr(
Identifier(Ident::new("c"))