Re: Question about UNNEST

2024-11-27 Thread Gabor Kaszab
Hi,

For that we'd need functions that can return nested types, but currently
there is no support in Impala for that. It was considered at some point,
there is even a Jira for that, but for some reason no one started working
on that item.

Regards,
Gabor

On Wed, Nov 27, 2024 at 5:00 AM Xiufeng Huang  wrote:

> Hi all,
>
> I was wondering if there is any plan to support UNNEST for expressions in
> Impala like what Postgres does?
>
> Sample sql for reference
> select unnest(string_to_array(col_string, ‘,’)) from tbl
>
> Thanks


Re: Question about UNNEST

2024-11-27 Thread Csaba Ringhofer
Hi Xiufeng!

This would be great to support in the long term, but currently several
parts are missing:
- there is no Impala function/udf interface in the backend to return
collections or get them as argument, so we cannot create a function like
string_to_array() at the moment
- the frontend planner part is also not simple

There was an attempt to implement functions that can return tables, but
sadly it was stuck in design phase:
https://docs.google.com/document/d/1-dVfGeIfXBpVKtoWmPye11BO7Wn-sQTqBMemKf9zJ4k/edit?tab=t.0#heading=h.rxomr7gsib44

regards,
Csaba

On Wed, Nov 27, 2024 at 5:00 AM Xiufeng Huang  wrote:

> Hi all,
>
> I was wondering if there is any plan to support UNNEST for expressions in
> Impala like what Postgres does?
>
> Sample sql for reference
> select unnest(string_to_array(col_string, ‘,’)) from tbl
>
> Thanks


Question about UNNEST

2024-11-26 Thread Xiufeng Huang
Hi all,

I was wondering if there is any plan to support UNNEST for expressions in 
Impala like what Postgres does?

Sample sql for reference
select unnest(string_to_array(col_string, ‘,’)) from tbl 

Thanks