You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "Michael-J-Ward (via GitHub)" <gi...@apache.org> on 2024/10/11 20:19:00 UTC

[I] Add `PyScalarUDF` and convert `PyScalarUDF` to API recommended upstream [datafusion-python]

Michael-J-Ward opened a new issue, #907:
URL: https://github.com/apache/datafusion-python/issues/907

   **Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
   
   Up until #906, `PyScalarUDF` has used `datafusion_physical_expr::functions` which has been deprecated since [v36](https://github.com/apache/datafusion/pull/8878), and is being removed from the public API in [v43](https://github.com/apache/datafusion/pull/12505).
   
   The [deprecation warning](https://github.com/apache/datafusion/blob/8e8bb89a285c6fe6e8186378b7798d3d213f08f7/datafusion/physical-expr/src/functions.rs#L55) advised:
   > Implement your function directly in terms of ColumnarValue or use `ScalarUDF` instead
   
   `datafusion-python` users can not currently implement `ScalarUDF` in that recommended way. 
   
   **Describe the solution you'd like**
   - Change `PyScalarUDF` to take functions that operate on `ColumnarValue`, as recommended upstream.
   - Add `PyScalarUDF` that let's python users continue writing UDF's as they do today.
    
   **Describe alternatives you've considered**
   We could remove the ability to write pyarrow UDF's, forcing users to migrate as directed in the deprecation warning.
   
   **Additional context**
   It may be useful to review how upstream previously converted functions that use `ArrayRef` to `ScalarUDF`.
   
   https://github.com/apache/datafusion/blob/8e8bb89a285c6fe6e8186378b7798d3d213f08f7/datafusion/physical-expr/src/functions.rs#L79-L122


-- 
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-unsubscribe@datafusion.apache.org.apache.org

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


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


Re: [I] Add `PyarrowScalarUDF` and convert `PyScalarUDF` to API recommended upstream [datafusion-python]

Posted by "timsaucer (via GitHub)" <gi...@apache.org>.
timsaucer closed issue #907: Add `PyarrowScalarUDF` and convert `PyScalarUDF` to API recommended upstream  
URL: https://github.com/apache/datafusion-python/issues/907


-- 
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-unsubscribe@datafusion.apache.org

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


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