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(<regex>) function.
   
   ```sql
   select COLUMNS('number\d+') from my_table.
   ```
   
   however, looking at the struct UDF, it seems that it only receives the 
columns that are passed to function invocation and doesn't have access to other 
columns, i.e. in the `struct` udf, all columns are returned as a struct, which 
suggests that the engine only pass a subset of the available columns
   
   However, in the case of COLUMNS('number\d+'), you need to have all the 
columns, and only return few of them from the function. In my understanding 
neither `udf` nor `udaf` or `udwf` from what I have seen. We would need maybe a 
fourth type of udf something like `udgf` which is invoked on all the columns of 
a logical plan?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to