Package org.apache.drill.exec.udfs
Class ThreatHuntingFunctions.StringEntropyFunction
java.lang.Object
org.apache.drill.exec.udfs.ThreatHuntingFunctions.StringEntropyFunction
- All Implemented Interfaces:
DrillFunc
,DrillSimpleFunc
- Enclosing class:
- ThreatHuntingFunctions
public static class ThreatHuntingFunctions.StringEntropyFunction
extends Object
implements DrillSimpleFunc
This function calculates the Shannon Entropy of a given string of text.
See: https://en.wikipedia.org/wiki/Entropy_(information_theory) for full definition.
Usage:
SELECT entropy(
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
StringEntropyFunction
public StringEntropyFunction()
-
-
Method Details
-
setup
public void setup()- Specified by:
setup
in interfaceDrillSimpleFunc
-
eval
public void eval()- Specified by:
eval
in interfaceDrillSimpleFunc
-