Support CREATE FUNCTION for BigQuery (#1253)

This commit is contained in:
Ifeanyi Ubah 2024-05-30 18:18:41 +02:00 committed by GitHub
parent d5faf3c54b
commit 792e389baa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 557 additions and 173 deletions

View file

@ -3285,16 +3285,18 @@ fn parse_create_function() {
OperateFunctionArg::unnamed(DataType::Integer(None)),
]),
return_type: Some(DataType::Integer(None)),
params: CreateFunctionBody {
language: Some("SQL".into()),
behavior: Some(FunctionBehavior::Immutable),
called_on_null: Some(FunctionCalledOnNull::Strict),
parallel: Some(FunctionParallel::Safe),
as_: Some(FunctionDefinition::SingleQuotedDef(
"select $1 + $2;".into()
)),
..Default::default()
},
language: Some("SQL".into()),
behavior: Some(FunctionBehavior::Immutable),
called_on_null: Some(FunctionCalledOnNull::Strict),
parallel: Some(FunctionParallel::Safe),
function_body: Some(CreateFunctionBody::AsBeforeOptions(Expr::Value(
Value::SingleQuotedString("select $1 + $2;".into())
))),
if_not_exists: false,
using: None,
determinism_specifier: None,
options: None,
remote_connection: None,
}
);
}