MCPcopy Create free account
hub / github.com/apache/datafusion / function_to_sql_internal

Method function_to_sql_internal

datafusion/sql/src/unparser/expr.rs:634–658  ·  view source on GitHub ↗
(
        &self,
        func_name: &str,
        args: &[Expr],
    )

Source from the content-addressed store, hash-verified

632 }
633
634 fn function_to_sql_internal(
635 &self,
636 func_name: &str,
637 args: &[Expr],
638 ) -> Result<ast::Expr> {
639 let args = self.function_args_to_sql(args)?;
640 Ok(ast::Expr::Function(Function {
641 name: ObjectName::from(vec![Ident {
642 value: func_name.to_string(),
643 quote_style: None,
644 span: Span::empty(),
645 }]),
646 args: ast::FunctionArguments::List(ast::FunctionArgumentList {
647 duplicate_treatment: None,
648 args,
649 clauses: vec![],
650 }),
651 filter: None,
652 null_treatment: None,
653 over: None,
654 within_group: vec![],
655 parameters: ast::FunctionArguments::None,
656 uses_odbc_syntax: false,
657 }))
658 }
659
660 fn make_array_to_sql(&self, args: &[Expr]) -> Result<ast::Expr> {
661 let args = args

Callers 2

expr_to_sql_innerMethod · 0.80

Calls 3

FunctionEnum · 0.85
function_args_to_sqlMethod · 0.80
ListClass · 0.50

Tested by

no test coverage detected