-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35968/#review89800
-----------------------------------------------------------



ql/src/java/org/apache/hadoop/hive/ql/udf/UDFCosineSimilarity.java (line 4)
<https://reviews.apache.org/r/35968/#comment142597>

    Oh, sorry didn't read well. You mean math3. Yes, you're right about this. 
Moving to use 
    
    {code}
    Math.pow(double, double)
    {code}
    
    instead.


- Nishant Kelkar


On June 28, 2015, 11:39 a.m., Nishant Kelkar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35968/
> -----------------------------------------------------------
> 
> (Updated June 28, 2015, 11:39 a.m.)
> 
> 
> Review request for hive and Alexander Pivovarov.
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> 1. Added preliminary UDF code for cosine similarity. 2. Added unit tests and 
> integration tests. 3. Registered the UDF in the FunctionRegistry class.
> 
> 
> Diffs
> -----
> 
>   .reviewboardrc abc33f91a44b76573cbba334c33417307c63956f 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 
> fabc21e2092561cbf98c35a406e4ee40e71fe1de 
>   ql/src/java/org/apache/hadoop/hive/ql/udf/UDFCosineSimilarity.java 
> PRE-CREATION 
>   ql/src/test/org/apache/hadoop/hive/ql/udf/TestUDFCosineSimilarity.java 
> PRE-CREATION 
>   ql/src/test/queries/clientnegative/udf_cosine_similarity_error_1.q 
> PRE-CREATION 
>   ql/src/test/queries/clientnegative/udf_cosine_similarity_wrongargs_1.q 
> PRE-CREATION 
>   ql/src/test/queries/clientnegative/udf_cosine_similarity_wrongargs_2.q 
> PRE-CREATION 
>   ql/src/test/queries/clientnegative/udf_cosine_similarity_wrongargs_3.q 
> PRE-CREATION 
>   ql/src/test/queries/clientpositive/udf_cosine_similarity.q PRE-CREATION 
>   ql/src/test/results/clientnegative/udf_cosine_similarity_error_1.q.out 
> PRE-CREATION 
>   ql/src/test/results/clientnegative/udf_cosine_similarity_error_2.q.out 
> PRE-CREATION 
>   ql/src/test/results/clientnegative/udf_cosine_similarity_wrongargs_1.q.out 
> PRE-CREATION 
>   ql/src/test/results/clientnegative/udf_cosine_similarity_wrongargs_2.q.out 
> PRE-CREATION 
>   ql/src/test/results/clientnegative/udf_cosine_similarity_wrongargs_3.q.out 
> PRE-CREATION 
>   ql/src/test/results/clientpositive/show_functions.q.out 
> 5de4ffcd1ace477af026b83fb7bfb8068fc192b3 
>   ql/src/test/results/clientpositive/udf_cosine_similarity.q.out PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/35968/diff/
> 
> 
> Testing
> -------
> 
> Function signature of the UDF is: cosine_similarity(Text, Text, Text)
> 
> Each "Text" can be one of {S=something,E=empty,N=null}
> 
> Unit tests written for the following cases:
> 1. cosine_similarity(S, S, S)
> 2. cosine_similarity(S, E, S)
> 3. cosine_similarity(N, E, S)
> 4. cosine_similarity(S, S, E)
> 5. cosine_similarity(N, N, N)
> 
> 
> Thanks,
> 
> Nishant Kelkar
> 
>

Reply via email to