-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Description
Type coercion and simplification applied to UDTF arguments may break some functions with specific arguments parsing logic. e.g. in our project we support UDTF that allows to specify index to scan a table: scan_with(t, index=[ta, tb]). Using SessionContextProvider as ContextProvider the next error is returned:
Schema error: No field named index.
It caused by the type coercion here:
datafusion/datafusion/core/src/execution/session_state.rs
Lines 1845 to 1852 in 4e2c0f1
| let args = args | |
| .into_iter() | |
| .map(|arg| { | |
| simplifier | |
| .coerce(arg, &schema) | |
| .and_then(|e| simplifier.simplify(e)) | |
| }) | |
| .collect::<datafusion_common::Result<Vec<_>>>()?; |
It would be nice to allow UDTF itself to handle arguments parsing. We could add a flag that will customize this behavior, allowing to pass args as is.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels