Skip to content

UDTF arguments preserving #20293

@askalt

Description

@askalt

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:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions