[
https://issues.apache.org/jira/browse/SPARK-49203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ruifeng Zheng resolved SPARK-49203.
-----------------------------------
Fix Version/s: 4.0.0
Resolution: Fixed
Issue resolved by pull request 47741
[https://github.com/apache/spark/pull/47741]
> 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
> Assignee: BingKun Pan
> Priority: Major
> Labels: pull-request-available
> Fix For: 4.0.0
>
>
> 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: [email protected]
For additional commands, e-mail: [email protected]