Class StringDistanceFunctions.HammingDistanceFunction

java.lang.Object
org.apache.drill.exec.udfs.StringDistanceFunctions.HammingDistanceFunction
All Implemented Interfaces:
DrillFunc, DrillSimpleFunc
Enclosing class:
StringDistanceFunctions

public static class StringDistanceFunctions.HammingDistanceFunction extends Object implements DrillSimpleFunc
The hamming distance between two strings of equal length is the number of positions at which the corresponding symbols are different.

For further explanation about the Hamming Distance, take a look at its Wikipedia page at http://en.wikipedia.org/wiki/Hamming_distance.

Usage: SELECT hamming_distance( string1, string2 ) FROM...

  • Constructor Details

    • HammingDistanceFunction

      public HammingDistanceFunction()
  • Method Details