jayzhan211 commented on issue #10102:
URL: https://github.com/apache/datafusion/issues/10102#issuecomment-2119060296
I didn't find equivalent behavior in postgres. I'm not sure should we
support this kind of `returns subset of columns based on column name matching`
--
This is an automated
jayzhan211 commented on issue #10102:
URL: https://github.com/apache/datafusion/issues/10102#issuecomment-2114676662
> However, in the case of COLUMNS('number\d+'), you need to have all the
columns, and only return few of them from the function
I agree, we can't get all the columns by
edmondop commented on issue #10102:
URL: https://github.com/apache/datafusion/issues/10102#issuecomment-2113997737
I want to create a udf that can select multiple functions at once, such as a
COLUMNS() function.
```sql
select COLUMNS('number\d+') from my_table.
```
howeve
jayzhan211 commented on issue #10102:
URL: https://github.com/apache/datafusion/issues/10102#issuecomment-2100049278
> > > How does the selection happens ?
> >
> >
> > I think you can select with something like `my_struct_col['foo']` which
returns the 'foo' field.
> > However n
universalmind303 commented on issue #10102:
URL: https://github.com/apache/datafusion/issues/10102#issuecomment-2081815788
FWIW, https://github.com/apache/datafusion/issues/10102 seems related as
multi selection could be implemented via `struct` and `unnest`.
--
This is an automa
edmondop commented on issue #10102:
URL: https://github.com/apache/datafusion/issues/10102#issuecomment-2080824673
> > How does the selection happens ?
>
> I think you can select with something like `my_struct_col['foo']` which
returns the 'foo' field.
>
> However now re-readin
alamb commented on issue #10102:
URL: https://github.com/apache/datafusion/issues/10102#issuecomment-2077825989
> How does the selection happens ?
I think you can select with something like `my_struct_col['foo']` which
returns the 'foo' field.
However now re-reading this ticket
edmondop commented on issue #10102:
URL: https://github.com/apache/datafusion/issues/10102#issuecomment-2077611758
Apologies I wasn't precise in my question. The code of the struct udf
doesn't explicitly drop fields but returns all of them.
How does the selection happens ?
--
This
alamb commented on issue #10102:
URL: https://github.com/apache/datafusion/issues/10102#issuecomment-2077598602
> @alamb by the way, how does the struct udf works?
I think
https://datafusion.apache.org/user-guide/sql/scalar_functions.html#struct has
some pretty good examples
--
T
edmondop commented on issue #10102:
URL: https://github.com/apache/datafusion/issues/10102#issuecomment-2076070730
```
> select struct(column1, column2) from abc;
+-+
| struct(abc.column1,abc.column2) |
+-+
| {c0:
edmondop commented on issue #10102:
URL: https://github.com/apache/datafusion/issues/10102#issuecomment-2076011028
@universalmind303 I think it would be interesting to test it, do you have an
example / have you written the UDF?
--
This is an automated message from the Apache Git Service.
11 matches
Mail list logo