Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ class AuronSparkTestSettings extends SparkTestSettings {
enableSuite[AuronMiscFunctionsSuite]

enableSuite[AuronStringFunctionsSuite]
// Native levenshtein has a Spark 3.5+ result or schema comparison mismatch.
.exclude("string Levenshtein distance")
// Native substr does not support BinaryType inputs.
// See https://github.com/apache/auron/issues/1724
.exclude("string / binary substring function")

enableSuite[AuronDataFrameAggregateSuite]
// See https://github.com/apache/auron/issues/1840
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,10 @@ class AuronSparkTestSettings extends SparkTestSettings {
enableSuite[AuronStringFunctionsSuite]
.exclude("string concat")
.exclude("string concat_ws")
// Spark 4 adds the threshold argument, but native levenshtein currently supports only
// two arguments.
.exclude("string Levenshtein distance")
.exclude("UTF-8 string validate")
.exclude("RegExpReplace throws the right exception when replace fails on a particular row")
// Native substr does not support BinaryType inputs.
.exclude("string / binary substring function")

enableSuite[AuronDataFrameAggregateSuite]
.disable("Native execution can crash in Spark 4")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,10 @@ class AuronSparkTestSettings extends SparkTestSettings {
enableSuite[AuronStringFunctionsSuite]
.exclude("string concat")
.exclude("string concat_ws")
// Spark 4 adds the threshold argument, but native levenshtein currently supports only
// two arguments.
.exclude("string Levenshtein distance")
.exclude("UTF-8 string validate")
.exclude("RegExpReplace throws the right exception when replace fails on a particular row")
// Native substr does not support BinaryType inputs.
.exclude("string / binary substring function")

enableSuite[AuronDataFrameAggregateSuite]
.disable("Native execution can crash in Spark 4")
Expand Down
3 changes: 2 additions & 1 deletion native-engine/auron-planner/proto/auron.proto
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,8 @@ enum ScalarFunction {
Hex=66;
Power=67;
IsNaN=69;
Levenshtein=80;
reserved 80;
reserved "Levenshtein";
FindInSet=81;
Nvl=82;
Nvl2=83;
Expand Down
3 changes: 1 addition & 2 deletions native-engine/auron-planner/src/planner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1313,8 +1313,7 @@ impl From<protobuf::ScalarFunction> for Arc<ScalarUDF> {
ScalarFunction::Rpad => f::unicode::rpad(),
ScalarFunction::SplitPart => f::string::split_part(),
ScalarFunction::StartsWith => f::string::starts_with(),
ScalarFunction::Levenshtein => f::string::levenshtein(),

// ScalarFunction::Levenshtein => f::string::levenshtein(),
ScalarFunction::FindInSet => f::unicode::find_in_set(),
ScalarFunction::Strpos => f::unicode::strpos(),
ScalarFunction::Substr => f::unicode::substr(),
Expand Down
1 change: 1 addition & 0 deletions native-engine/datafusion-ext-functions/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ pub fn create_auron_ext_function(
"Spark_StringLower" => Arc::new(spark_strings::string_lower),
"Spark_StringUpper" => Arc::new(spark_strings::string_upper),
"Spark_Substring" => Arc::new(spark_strings::spark_substring),
"Spark_Levenshtein" => Arc::new(spark_strings::spark_levenshtein),
"Spark_InitCap" => Arc::new(spark_initcap::string_initcap),
"Spark_Year" => Arc::new(spark_dates::spark_year),
"Spark_Month" => Arc::new(spark_dates::spark_month),
Expand Down
Loading
Loading