glaredb icon indicating copy to clipboard operation
glaredb copied to clipboard

Table functions in the select list

Open universalmind303 opened this issue 1 year ago • 1 comments

Description

i'd like to be able to use table functions as scalars for simple select functions.

currently i have to do something like

select first_name from read_parquet('userdata1.parquet')

when I would prefer to just do

select read_parquet('userdata1.parquet').first_name

Internally, we can pretty easily wrap the outputs of the table function as scalar structs instead of recordbatches.

universalmind303 avatar Apr 04 '24 17:04 universalmind303

Those functions should still be returning tables, TODO here: https://github.com/glaredb/glaredb/blob/0fab58b30045282051dabb6ff5d5f7cbc2b5cbbb/crates/glaredb_core/src/logical/resolver/resolved_function.rs#L3-L25

scsmithr avatar Apr 07 '25 21:04 scsmithr