You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by GitBox <gi...@apache.org> on 2021/02/22 21:18:47 UTC

[GitHub] [datasketches-hive] packet23 opened a new pull request #55: EstimateSketchSimilarityUDF

packet23 opened a new pull request #55:
URL: https://github.com/apache/datasketches-hive/pull/55


   Hey Datasketches-Hive maintainers,
   
   here is the PR for the UDF I mentioned on dev@datasketches.apache.org. It adds `EstimateSketchSimilarityUDF` that exposes `org.apache.datasketches.theta.JaccardSimilarity` via Hive.
   
   Intended usage would be either to compare distinct values of two columns:
   
   ```sql
   SELECT estimateSketchSimilarity(i.sketchA, i.sketchB) AS similarity
   FROM (
     SELECT
       dataToSketch(colA) AS sketchA,
       dataToSketch(colB) AS sketchB
     FROM table
   ) i
   ```
   
   or columns from two tables:
   
   ```sql
   SELECT
     estimateSketchSimilarity(o.sketches[0], o.sketches[1]) AS similarity
   FROM (
     SELECT COLLECT_LIST(sketch) AS sketches
     FROM (
       SELECT dataToSketch(colA) AS sketch FROM tableA
       UNION ALL
       SELECT dataToSketch(colB) AS sketch FROM tableB
     ) i
   ) o
   ```
   
   Original tables do not have to be available, as long as persisted sketches are still available.
   
   I'd really appreciate inclusion of such functionality in `datasketches-hive` as it enables use cases that are currently only possible with `datasketches-java` and therefore require custom Java code.
   
   
   Best regards,
   
   Sebastian


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org


[GitHub] [datasketches-hive] leerho merged pull request #55: EstimateSketchSimilarityUDF

Posted by GitBox <gi...@apache.org>.
leerho merged pull request #55:
URL: https://github.com/apache/datasketches-hive/pull/55


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org


[GitHub] [datasketches-hive] AlexanderSaydakov commented on pull request #55: EstimateSketchSimilarityUDF

Posted by GitBox <gi...@apache.org>.
AlexanderSaydakov commented on pull request #55:
URL: https://github.com/apache/datasketches-hive/pull/55#issuecomment-784430050


   Looks good to me.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org