cloud-fan commented on code in PR #41724:
URL: https://github.com/apache/spark/pull/41724#discussion_r1242607029


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala:
##########
@@ -2164,9 +2164,28 @@ case class Levenshtein(
     if (children.length > 3 || children.length < 2) {
       throw QueryCompilationErrors.wrongNumArgsError(
         toSQLId(prettyName), Seq(2, 3), children.length)
-    } else {
-      super.checkInputDataTypes()
     }
+    if (children.length == 3) {
+      threshold match {
+        case Some(e) if !e.foldable =>

Review Comment:
   since the API takes `Column` now, I think it's fine to allow non-foldable 
threshold. We can do the check at runtime.



-- 
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]

Reply via email to