[ 
https://issues.apache.org/jira/browse/HIVE-22940?focusedWorklogId=402471&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-402471
 ]

ASF GitHub Bot logged work on HIVE-22940:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 12/Mar/20 20:38
            Start Date: 12/Mar/20 20:38
    Worklog Time Spent: 10m 
      Work Description: jcamachor commented on pull request #930: HIVE-22940 
datasketches functions
URL: https://github.com/apache/hive/pull/930#discussion_r391881328
 
 

 ##########
 File path: 
ql/src/java/org/apache/hadoop/hive/ql/exec/DataSketchesFunctions.java
 ##########
 @@ -0,0 +1,218 @@
+package org.apache.hadoop.hive.ql.exec;
+
+import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFResolver2;
+import org.apache.hadoop.hive.ql.udf.generic.GenericUDTF;
+
+public class DataSketchesFunctions {
+
+  private static final String DATA_TO_SKETCH = "datatosketch";
+  private static final String SKETCH_TO_ESTIMATE_WITH_ERROR_BOUNDS = 
"sketchToEstimateWithErrorBounds";
+  // FIXME: consider to rename it to simply "estimate" or "evaluate" - in case 
of the counting sketches the "sketchto..." doesnt add value
+  private static final String SKETCH_TO_ESTIMATE = "sketchToEstimate";
+  private static final String SKETCH_TO_STRING = "sketchToString";
+  // FIXME: probably use simply "union" instead unionSketch?
+  private static final String UNION_SKETCH = "unionSketch";
+  private static final String GET_N = "getN";
+  private static final String GET_CDF = "getCdf";
+  private static final String GET_PMF = "getPmf";
+  private static final String GET_QUANTILES = "GetQuantiles";
+  private static final String GET_QUANTILE = "GetQuantile";
+  private static final String GET_RANK = "getRank";
+  private static final String INTERSECT_SKETCH = "intersection";
+  private static final String EXCLUDE_SKETCH = "exclude";
+  private static final String GET_K = "getK";
+  private static final String GET_FREQUENT_ITEMS = "getFrequentItems";
+  private static final String T_TEST = "TTest";
+  private static final String SKETCH_TO_MEANS = "sketchtomeans";
+  private static final String SKETCH_TO_NUMBER_OF_RETAINED_ENTRIES = 
"sketchtonumberofretainedentries";
+  private static final String SKETCH_TO_QUANTILES_SKETCH = 
"sketchToQuantilesSketch";
+  private static final String SKETCH_TO_VALUES = "sketchToValues";
+  private static final String SKETCH_TO_VARIANCES = "sketchToVariances";
+  private static final String SKETCH_TO_PERCENTILE = "sketchToPercentile";
+  private static final String UNION_SKETCH1 = "unionSketch1";
+  private static final String INTERSECT_SKETCH1 = "intersect";
+
+  private final Registry system;
+
+  public DataSketchesFunctions(Registry system) {
+    this.system = system;
+  }
+
+  public static void register(Registry system) {
+    DataSketchesFunctions dsf = new DataSketchesFunctions(system);
+    // FIXME: what this should be approx, ds ... other?
+    String prefix = "ds";
 
 Review comment:
   I like `ds` 
 
----------------------------------------------------------------
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:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 402471)
    Time Spent: 2.5h  (was: 2h 20m)

> Make the datasketches functions available as predefined functions 
> ------------------------------------------------------------------
>
>                 Key: HIVE-22940
>                 URL: https://issues.apache.org/jira/browse/HIVE-22940
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: Zoltan Haindrich
>            Assignee: Zoltan Haindrich
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HIVE-22940.01.patch, HIVE-22940.02.patch
>
>          Time Spent: 2.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to