Re: [I] select multiple columns in a single `Expr` [datafusion]

2024-05-18 Thread via GitHub
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

Re: [I] select multiple columns in a single `Expr` [datafusion]

2024-05-16 Thread via GitHub
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

Re: [I] select multiple columns in a single `Expr` [datafusion]

2024-05-15 Thread via GitHub
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

Re: [I] select multiple columns in a single `Expr` [datafusion]

2024-05-08 Thread via GitHub
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

Re: [I] select multiple columns in a single `Expr` [datafusion]

2024-04-28 Thread via GitHub
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

Re: [I] select multiple columns in a single `Expr` [datafusion]

2024-04-27 Thread via GitHub
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

Re: [I] select multiple columns in a single `Expr` [datafusion]

2024-04-25 Thread via GitHub
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

Re: [I] select multiple columns in a single `Expr` [datafusion]

2024-04-25 Thread via GitHub
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

Re: [I] select multiple columns in a single `Expr` [datafusion]

2024-04-25 Thread via GitHub
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

Re: [I] select multiple columns in a single `Expr` [datafusion]

2024-04-24 Thread via GitHub
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:

Re: [I] select multiple columns in a single `Expr` [datafusion]

2024-04-24 Thread via GitHub
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.