[
https://issues.apache.org/jira/browse/HIVE-9557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14599737#comment-14599737
]
Alexander Pivovarov commented on HIVE-9557:
-------------------------------------------
Hi Nishant,
Thank you for the patch. Can you look at the following recommendations/issues
- usually patch name should look like HIVE-9557.1.patch
- can you attach RB link to the Jira? So, we can leave comments for particular
code lines
- you have to provide integration tests for the function (q file and q.out file)
- the function should be registered
- probably you can look at HIVE-9556 as an example
- hive code uses 2 spaces for indent
- "a*b" should be separated by space "a * b"
> create UDF to measure strings similarity using Cosine Similarity algo
> ---------------------------------------------------------------------
>
> Key: HIVE-9557
> URL: https://issues.apache.org/jira/browse/HIVE-9557
> Project: Hive
> Issue Type: Improvement
> Components: UDF
> Reporter: Alexander Pivovarov
> Assignee: Nishant Kelkar
> Labels: CosineSimilarity, SimilarityMetric, UDF
> Attachments: udf_cosine_similarity-v01.patch
>
>
> algo description http://en.wikipedia.org/wiki/Cosine_similarity
> {code}
> --one word different, total 2 words
> str_sim_cosine('Test String1', 'Test String2') = (2 - 1) / 2 = 0.5f
> {code}
> reference implementation:
> https://github.com/Simmetrics/simmetrics/blob/master/src/uk/ac/shef/wit/simmetrics/similaritymetrics/CosineSimilarity.java
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)