timsaucer opened a new pull request, #1567:
URL: https://github.com/apache/datafusion-python/pull/1567

   # Which issue does this PR close?
   
   Closes #. No tracking issue; gap surfaced during the v54 upstream coverage 
audit.
   
   # Rationale for this change
   
   These four scalar functions exist in `datafusion::functions_nested::expr_fn` 
(DataFusion 54) but were not exposed through the Python bindings. They round 
out the array/vector-distance surface that callers already see via 
`array_distance`, `array_sort`, `array_distinct`, etc.
   
   # What changes are included in this PR?
   
   - `crates/core/src/functions.rs`: add four `array_fn!` entries 
(`array_compact`, `array_normalize`, `cosine_distance`, `inner_product`) and 
register them on the Python module.
   - `python/datafusion/functions.py`: add Python wrappers with doctest 
examples, two `list_*` aliases (`list_compact`, `list_normalize`) using the 
one-line + `See Also` form, and the corresponding `__all__` entries.
   
   `inner_product` is the canonical name; the SQL alias `dot_product` continues 
to resolve through the upstream UDF's alias list and is mentioned in the 
docstring.
   
   # Are there any user-facing changes?
   
   Yes. Six new public functions in `datafusion.functions`:
   
   - `array_compact(array)` / `list_compact(array)`
   - `array_normalize(array)` / `list_normalize(array)`
   - `cosine_distance(array1, array2)`
   - `inner_product(array1, array2)`
   
   No breaking changes.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to