[
https://issues.apache.org/jira/browse/SPARK-43493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17722720#comment-17722720
]
BingKun Pan edited comment on SPARK-43493 at 5/15/23 9:46 AM:
--------------------------------------------------------------
Let me implements it at `sql` first, I will implements it at `connect` later.
was (Author: panbingkun):
Let me implements it at `sql` first, I will implements it ad `connect` later.
> Add a max distance argument to the levenshtein() function
> ---------------------------------------------------------
>
> Key: SPARK-43493
> URL: https://issues.apache.org/jira/browse/SPARK-43493
> Project: Spark
> Issue Type: New Feature
> Components: SQL
> Affects Versions: 3.4.0
> Reporter: Max Gekk
> Priority: Major
>
> Currently, Spark's levenshtein(str1, str2) function can be very inefficient
> for long strings. Many other databases which support this type of built-in
> function also take a third argument which signifies a maximum distance after
> which it is okay to terminate the algorithm.
> For example something like
> {code:sql}
> levenshtein(str1, str2[, max_distance])
> {code}
> the function stops computing the distant once the max values is reached.
> See postgresql for an example of a 3 argument
> [levenshtein|https://www.postgresql.org/docs/current/fuzzystrmatch.html#id-1.11.7.26.7].
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]