[ 
https://issues.apache.org/jira/browse/HIVE-14470?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jesus Camacho Rodriguez resolved HIVE-14470.
--------------------------------------------
       Resolution: Fixed
    Fix Version/s: 2.2.0

Pushed in HIVE-14217.

> Read results for Druid TopN query
> ---------------------------------
>
>                 Key: HIVE-14470
>                 URL: https://issues.apache.org/jira/browse/HIVE-14470
>             Project: Hive
>          Issue Type: Sub-task
>          Components: Druid integration
>    Affects Versions: 2.2.0
>            Reporter: Jesus Camacho Rodriguez
>            Assignee: Jesus Camacho Rodriguez
>             Fix For: 2.2.0
>
>
> Format of results for Druid TopN queries is as follows:
> {code}
> [
>   {
>     "timestamp": "2013-08-31T00:00:00.000Z",
>     "result": [
>       {
>         "dim1": "dim1_val",
>         "count": 111,
>         "some_metrics": 10669,
>         "average": 96.11711711711712
>       },
>       {
>         "dim1": "another_dim1_val",
>         "count": 88,
>         "some_metrics": 28344,
>         "average": 322.09090909090907
>       },
>       {
>         "dim1": "dim1_val3",
>         "count": 70,
>         "some_metrics": 871,
>         "average": 12.442857142857143
>       },
>       {
>         "dim1": "dim1_val4",
>         "count": 62,
>         "some_metrics": 815,
>         "average": 13.14516129032258
>       },
>       {
>         "dim1": "dim1_val5",
>         "count": 60,
>         "some_metrics": 2787,
>         "average": 46.45
>       }
>     ]
>   }
> ]
> {code}
> Out of this query results, we will generate Hive records with the following 
> format:
> {code}
> [ new TimestampWritable(new Timestamp(1377907200000L)), new Text("dim1_val"), 
> new LongWritable(111), new FloatWritable(10669F), new 
> FloatWritable(96.11711711711712F) ]
> [ new TimestampWritable(new Timestamp(1377907200000L)), new 
> Text("another_dim1_val"), new LongWritable(88), new FloatWritable(28344F), 
> new FloatWritable(322.09090909090907F) ]
> [ new TimestampWritable(new Timestamp(1377907200000L)), new 
> Text("dim1_val3"), new LongWritable(70), new FloatWritable(871F), new 
> FloatWritable(12.442857142857143F) ]
> [ new TimestampWritable(new Timestamp(1377907200000L)), new 
> Text("dim1_val4"), new LongWritable(62), new FloatWritable(815F), new 
> FloatWritable(13.14516129032258F) ]
> [ new TimestampWritable(new Timestamp(1377907200000L)), new 
> Text("dim1_val5"), new LongWritable(60), new FloatWritable(2787F), new 
> FloatWritable(46.45F) ]
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to