aoto-tech commented on issue #25265:
URL: https://github.com/apache/datafusion/issues/25265#issuecomment-5653473361

   cosine_distance is particularly tricky.
   - array_distance: Relatively straightforward. Scale the differences by their 
maximum absolute value before computing the sum of squares.
   - array_normalize: Similar—divide by the largest absolute component before 
calculating the norm.
   - cosine_distance: More difficult because not only the norms but also the a 
* b terms in the dot product can overflow. The implementation also needs to 
handle cancellation between positive and negative values, zero vectors, and the 
semantics of NaN and Infinity.


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