austin362667 opened a new issue, #12475:
URL: https://github.com/apache/datafusion/issues/12475

   ### Is your feature request related to a problem or challenge?
   
   The current `array-nested` implementations lack support for the 
`list_dot_product`/`array_inner_product` functionality. This feature is 
essential for users who want to calculate dot product or even cosine distance 
between two numeric arrays. It might be useful in modern AI workloads, such as 
distance of two embeddings.
   
   Expect result:
   ```
   > select array_dot_product([1, 2], [1, 4]);
   +------------------------------------+
   | array_dot_product(List([1,2], [1,4])) |
   +------------------------------------+
   | 9.0                                |
   +------------------------------------+
   ```
   
   ### Describe the solution you'd like
   
   Add support  for `array_dot_product`/`list_dot_product`, just like what we 
did in `array_distance`/`list_distance`.
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Additional context
   
   DuckDB supports 
[list_dot_product](https://duckdb.org/docs/sql/functions/list.html#list_dot_productlist1-list2)
 and 
[array_inner_product](https://duckdb.org/docs/sql/functions/array#array_inner_productarray1-array2).
   
   > side note: In DuckDB, list and array have different definitions, and in 
DataFusion, they are considered the same.


-- 
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.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