You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "BingKun Pan (Jira)" <ji...@apache.org> on 2024/08/13 09:31:00 UTC

[jira] [Commented] (SPARK-49203) Add expression for `java.util.Arrays.binarySearch`

    [ https://issues.apache.org/jira/browse/SPARK-49203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17873158#comment-17873158 ] 

BingKun Pan commented on SPARK-49203:
-------------------------------------

I work on it.

> Add expression for `java.util.Arrays.binarySearch`
> --------------------------------------------------
>
>                 Key: SPARK-49203
>                 URL: https://issues.apache.org/jira/browse/SPARK-49203
>             Project: Spark
>          Issue Type: Sub-task
>          Components: PySpark, SQL
>    Affects Versions: 4.0.0
>            Reporter: Ruifeng Zheng
>            Priority: Major
>
> Add a dedicated expression 
> {code:java}
> ArrayBinarySearch(array, value) {code}
> for binary search, the behavior should be the same as `java.util.Arrays.binarySearch`, so that we can use it to implement histogram plot in the client side (no longer need to depend on mllib's Bucketizer)
>  
> This expression is for internal purposes, should not be exposed to end users.
> It assume the array is already sorted.
> if array or value is null, returns null.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org