Package org.apache.drill.exec.udfs
Class StringDistanceFunctions.LevenstheinDistanceFunction
java.lang.Object
org.apache.drill.exec.udfs.StringDistanceFunctions.LevenstheinDistanceFunction
- All Implemented Interfaces:
DrillFunc
,DrillSimpleFunc
- Enclosing class:
- StringDistanceFunctions
public static class StringDistanceFunctions.LevenstheinDistanceFunction
extends Object
implements DrillSimpleFunc
An algorithm for measuring the difference between two character sequences.
This is the number of changes needed to change one sequence into another, where each change is a single character modification (deletion, insertion or substitution).
Usage: SELECT levenshtein_distance( string1, string2 ) FROM...
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
LevenstheinDistanceFunction
public LevenstheinDistanceFunction()
-
-
Method Details
-
setup
public void setup()- Specified by:
setup
in interfaceDrillSimpleFunc
-
eval
public void eval()- Specified by:
eval
in interfaceDrillSimpleFunc
-