davidlghellin commented on code in PR #22890:
URL: https://github.com/apache/datafusion/pull/22890#discussion_r3391135044
##########
datafusion/spark/src/function/string/mod.rs:
##########
@@ -92,6 +94,11 @@ pub mod expr_fn {
"Returns the character length of string data or number of bytes of
binary data. The length of string data includes the trailing spaces. The length
of binary data includes binary zeros.",
arg1
));
+ export_functions!((
+ levenshtein,
+ "Returns the Levenshtein distance between two strings. Optionally
accepts a threshold; returns -1 if the distance exceeds it.",
+ str1 str2 threshold
+ ));
Review Comment:
Confirmed — the macro generated a fixed 3-arg builder. Replaced it with a
manual `pub fn levenshtein(args: Vec<Expr>) -> Expr` wrapper (same pattern as
`concat_ws`/`trim` in core), so both 2-arg and 3-arg forms are reachable.
--
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]