Package org.apache.drill.exec.udfs
Class StringDistanceFunctions.JaroDistanceFunction
java.lang.Object
org.apache.drill.exec.udfs.StringDistanceFunctions.JaroDistanceFunction
- All Implemented Interfaces:
DrillFunc
,DrillSimpleFunc
- Enclosing class:
- StringDistanceFunctions
public static class StringDistanceFunctions.JaroDistanceFunction
extends Object
implements DrillSimpleFunc
A similarity algorithm indicating the percentage of matched characters between two character sequences.
The Jaro measure is the weighted sum of percentage of matched characters from each file and transposed characters. Winkler increased this measure for matching initial characters.
This implementation is based on the Jaro Winkler similarity algorithm from https://en.wikipedia.org/wiki/Jaro–Winkler_distance
Usage: SELECT jaro_distance( string1, string2 ) FROM...
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
JaroDistanceFunction
public JaroDistanceFunction()
-
-
Method Details
-
setup
public void setup()- Specified by:
setup
in interfaceDrillSimpleFunc
-
eval
public void eval()- Specified by:
eval
in interfaceDrillSimpleFunc
-