zhengruifeng commented on PR #47741:
URL: https://github.com/apache/spark/pull/47741#issuecomment-2287658793

   
   
   > We already have array_position which does something similar. Granted it is 
1 based, and it does not return the position of where you could insert your 
data. Why do we need this?
   
   hi @hvanhovell the array_position doesn't do the same thing if the value is 
not in the array:
   ```
   array_position(array(1.0, 2.0, 3.0), 1.1) -> return 0
   binary_search(array(1.0, 2.0, 3.0), 1.1) -> return -2
   ```
   
   @LuciferYang @yaooqinn this is a dedicated expression for ML and PySpark 
Plotting, we want to implement  the histogram without depending on mllib which 
is not compatible with Spark Connect.
   
   
   


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