import org.apache.spark.sql.functions

val jdf = df1.join(df2,functions.levenshtein(df2("str_col1"),df1("str_col2"))<5)