alamb commented on code in PR #10392: URL: https://github.com/apache/datafusion/pull/10392#discussion_r1626434949
########## datafusion/expr/src/logical_plan/ddl.rs: ########## @@ -341,29 +341,8 @@ pub struct CreateFunctionBody { pub language: Option<Ident>, /// IMMUTABLE | STABLE | VOLATILE pub behavior: Option<Volatility>, - /// AS 'definition' - pub as_: Option<DefinitionStatement>, - /// RETURN expression - pub return_: Option<Expr>, -} - -#[derive(Clone, PartialEq, Eq, Hash, Debug)] -pub enum DefinitionStatement { - SingleQuotedDef(String), - DoubleDollarDef(String), -} - -impl From<sqlparser::ast::FunctionDefinition> for DefinitionStatement { - fn from(value: sqlparser::ast::FunctionDefinition) -> Self { - match value { - sqlparser::ast::FunctionDefinition::SingleQuotedDef(s) => { - Self::SingleQuotedDef(s) - } - sqlparser::ast::FunctionDefinition::DoubleDollarDef(s) => { - Self::DoubleDollarDef(s) - } - } - } + /// RETURN or AS function body + pub function_body: Option<Expr>, Review Comment: I added a test and made this syntax work in this pr in 84468515808991159632aac8db0f68e7e039419b -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org