Hive UDF for FastDTW and DTW