Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Multi-Column Producing Function Implementation #2343

Open
Ted-Jiang opened this issue Apr 26, 2022 · 2 comments
Open

Support Multi-Column Producing Function Implementation #2343

Ted-Jiang opened this issue Apr 26, 2022 · 2 comments

Comments

@Ted-Jiang
Copy link
Member

I think we will need to introduce a new type of function to cover inline since it is not a scalar function.

I don't have a good name for it yet but I think we need something like this?

pub type MultiColumnProducingFunctionImplementation =
    Arc<dyn Fn(&[ColumnarValue]) -> Result<Vec<ColumnarValue>> + Send + Sync>;

Originally posted by @andygrove in #2330 (comment)

@Ted-Jiang
Copy link
Member Author

I thinks we can call it TableFunctionImplementation
https://docs.snowflake.com/en/sql-reference/functions-table.html

@alamb
Copy link
Contributor

alamb commented Apr 26, 2022

I think a multiple column table function is different than a "table function"

A table function returns (potentially) multiple columns and rows where as I think this ticket is just talking about returning multiple columns.

The natural thing in my mind for this usecase would be to return a single column of DataType::Struct (or DataType::List)

However DataFusion's support for such compound datatypes is in need of work -- see #2326

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants