File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -257,6 +257,9 @@ config_namespace! {
257257 /// parallel file scanning. Setting this to `true` ensures that newlines in values are
258258 /// parsed successfully, which may reduce performance.
259259 pub newlines_in_values: bool , default = false
260+
261+ /// Specifies whether UDTF arguments expressions must be simplified.
262+ pub simplify_udtf_args: bool , default = true
260263 }
261264}
262265
Original file line number Diff line number Diff line change @@ -1844,14 +1844,17 @@ impl ContextProvider for SessionContextProvider<'_> {
18441844 ) ;
18451845 let simplifier = ExprSimplifier :: new ( simplify_context) ;
18461846 let schema = DFSchema :: empty ( ) ;
1847- let args = args
1848- . into_iter ( )
1849- . map ( |arg| {
1850- simplifier
1851- . coerce ( arg, & schema)
1852- . and_then ( |e| simplifier. simplify ( e) )
1853- } )
1854- . collect :: < datafusion_common:: Result < Vec < _ > > > ( ) ?;
1847+ let args = if !self . state . config . options ( ) . catalog . simplify_udtf_args {
1848+ args
1849+ } else {
1850+ args. into_iter ( )
1851+ . map ( |arg| {
1852+ simplifier
1853+ . coerce ( arg, & schema)
1854+ . and_then ( |e| simplifier. simplify ( e) )
1855+ } )
1856+ . collect :: < datafusion_common:: Result < Vec < _ > > > ( ) ?
1857+ } ;
18551858 let provider = tbl_func. create_table_provider_with_args ( TableFunctionArgs {
18561859 args : & args,
18571860 session : self . state ,
You can’t perform that action at this time.
0 commit comments