Package org.apache.drill.exec.udfs
Class StringDistanceFunctions.CosineDistanceFunction
java.lang.Object
org.apache.drill.exec.udfs.StringDistanceFunctions.CosineDistanceFunction
- All Implemented Interfaces:
DrillFunc
,DrillSimpleFunc
- Enclosing class:
- StringDistanceFunctions
public static class StringDistanceFunctions.CosineDistanceFunction
extends Object
implements DrillSimpleFunc
This function calculates the cosine distance between two strings.
Usage: SELECT cosine_distance( string1, string2 ) AS cosine_distance FROM...
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
CosineDistanceFunction
public CosineDistanceFunction()
-
-
Method Details
-
setup
public void setup()- Specified by:
setup
in interfaceDrillSimpleFunc
-
eval
public void eval()- Specified by:
eval
in interfaceDrillSimpleFunc
-