c94cbe9bd480c4d93207702fab7a2998a45bac3f
[hive.git] / ql / src / test / results / clientpositive / druid_intervals.q.out
1 PREHOOK: query: CREATE EXTERNAL TABLE druid_table_1
2 STORED BY 'org.apache.hadoop.hive.druid.QTestDruidStorageHandler'
3 TBLPROPERTIES ("druid.datasource" = "wikipedia")
4 PREHOOK: type: CREATETABLE
5 PREHOOK: Output: database:default
6 PREHOOK: Output: default@druid_table_1
7 POSTHOOK: query: CREATE EXTERNAL TABLE druid_table_1
8 STORED BY 'org.apache.hadoop.hive.druid.QTestDruidStorageHandler'
9 TBLPROPERTIES ("druid.datasource" = "wikipedia")
10 POSTHOOK: type: CREATETABLE
11 POSTHOOK: Output: database:default
12 POSTHOOK: Output: default@druid_table_1
13 PREHOOK: query: DESCRIBE FORMATTED druid_table_1
14 PREHOOK: type: DESCTABLE
15 PREHOOK: Input: default@druid_table_1
16 POSTHOOK: query: DESCRIBE FORMATTED druid_table_1
17 POSTHOOK: type: DESCTABLE
18 POSTHOOK: Input: default@druid_table_1
19 # col_name              data_type               comment             
20 __time                  timestamp with local time zone  from deserializer   
21 robot                   string                  from deserializer   
22 namespace               string                  from deserializer   
23 anonymous               string                  from deserializer   
24 unpatrolled             string                  from deserializer   
25 page                    string                  from deserializer   
26 language                string                  from deserializer   
27 newpage                 string                  from deserializer   
28 user                    string                  from deserializer   
29 count                   float                   from deserializer   
30 added                   float                   from deserializer   
31 delta                   float                   from deserializer   
32 variation               float                   from deserializer   
33 deleted                 float                   from deserializer   
34                  
35 # Detailed Table Information             
36 Database:               default                  
37 #### A masked pattern was here ####
38 Retention:              0                        
39 #### A masked pattern was here ####
40 Table Type:             EXTERNAL_TABLE           
41 Table Parameters:                
42         COLUMN_STATS_ACCURATE   {\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"__time\":\"true\",\"added\":\"true\",\"anonymous\":\"true\",\"count\":\"true\",\"deleted\":\"true\",\"delta\":\"true\",\"language\":\"true\",\"namespace\":\"true\",\"newpage\":\"true\",\"page\":\"true\",\"robot\":\"true\",\"unpatrolled\":\"true\",\"user\":\"true\",\"variation\":\"true\"}}
43         EXTERNAL                TRUE                
44         druid.datasource        wikipedia           
45         numFiles                0                   
46         numRows                 0                   
47         rawDataSize             0                   
48         storage_handler         org.apache.hadoop.hive.druid.QTestDruidStorageHandler
49         totalSize               0                   
50 #### A masked pattern was here ####
51                  
52 # Storage Information            
53 SerDe Library:          org.apache.hadoop.hive.druid.QTestDruidSerDe     
54 InputFormat:            null                     
55 OutputFormat:           null                     
56 Compressed:             No                       
57 Num Buckets:            -1                       
58 Bucket Columns:         []                       
59 Sort Columns:           []                       
60 Storage Desc Params:             
61         serialization.format    1                   
62 PREHOOK: query: EXPLAIN
63 SELECT `__time`
64 FROM druid_table_1
65 PREHOOK: type: QUERY
66 POSTHOOK: query: EXPLAIN
67 SELECT `__time`
68 FROM druid_table_1
69 POSTHOOK: type: QUERY
70 STAGE DEPENDENCIES:
71   Stage-0 is a root stage
72
73 STAGE PLANS:
74   Stage: Stage-0
75     Fetch Operator
76       limit: -1
77       Processor Tree:
78         TableScan
79           alias: druid_table_1
80           properties:
81             druid.query.json {"queryType":"select","dataSource":"wikipedia","descending":false,"intervals":["1900-01-01T00:00:00.000Z/3000-01-01T00:00:00.000Z"],"dimensions":[],"metrics":[],"granularity":"all","pagingSpec":{"threshold":16384,"fromNext":true},"context":{"druid.query.fetch":false}}
82             druid.query.type select
83           Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
84           Select Operator
85             expressions: __time (type: timestamp with local time zone)
86             outputColumnNames: _col0
87             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
88             ListSink
89
90 PREHOOK: query: EXPLAIN
91 SELECT `__time`
92 FROM druid_table_1
93 WHERE `__time` < '2012-03-01 00:00:00'
94 PREHOOK: type: QUERY
95 POSTHOOK: query: EXPLAIN
96 SELECT `__time`
97 FROM druid_table_1
98 WHERE `__time` < '2012-03-01 00:00:00'
99 POSTHOOK: type: QUERY
100 STAGE DEPENDENCIES:
101   Stage-0 is a root stage
102
103 STAGE PLANS:
104   Stage: Stage-0
105     Fetch Operator
106       limit: -1
107       Processor Tree:
108         TableScan
109           alias: druid_table_1
110           properties:
111             druid.query.json {"queryType":"select","dataSource":"wikipedia","descending":false,"intervals":["1900-01-01T00:00:00.000Z/2012-03-01T08:00:00.000Z"],"dimensions":[],"metrics":[],"granularity":"all","pagingSpec":{"threshold":16384,"fromNext":true},"context":{"druid.query.fetch":false}}
112             druid.query.type select
113           Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
114           Select Operator
115             expressions: __time (type: timestamp with local time zone)
116             outputColumnNames: _col0
117             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
118             ListSink
119
120 PREHOOK: query: EXPLAIN
121 SELECT `__time`
122 FROM druid_table_1
123 WHERE `__time` >= '2010-01-01 00:00:00' AND `__time` <= '2012-03-01 00:00:00'
124 PREHOOK: type: QUERY
125 POSTHOOK: query: EXPLAIN
126 SELECT `__time`
127 FROM druid_table_1
128 WHERE `__time` >= '2010-01-01 00:00:00' AND `__time` <= '2012-03-01 00:00:00'
129 POSTHOOK: type: QUERY
130 STAGE DEPENDENCIES:
131   Stage-0 is a root stage
132
133 STAGE PLANS:
134   Stage: Stage-0
135     Fetch Operator
136       limit: -1
137       Processor Tree:
138         TableScan
139           alias: druid_table_1
140           properties:
141             druid.query.json {"queryType":"select","dataSource":"wikipedia","descending":false,"intervals":["2010-01-01T08:00:00.000Z/2012-03-01T08:00:00.001Z"],"dimensions":[],"metrics":[],"granularity":"all","pagingSpec":{"threshold":16384,"fromNext":true},"context":{"druid.query.fetch":false}}
142             druid.query.type select
143           Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
144           Select Operator
145             expressions: __time (type: timestamp with local time zone)
146             outputColumnNames: _col0
147             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
148             ListSink
149
150 PREHOOK: query: EXPLAIN
151 SELECT `__time`
152 FROM druid_table_1
153 WHERE `__time` >= '2010-01-01 00:00:00' AND `__time` <= '2012-03-01 00:00:00'
154     AND `__time` < '2011-01-01 00:00:00'
155 PREHOOK: type: QUERY
156 POSTHOOK: query: EXPLAIN
157 SELECT `__time`
158 FROM druid_table_1
159 WHERE `__time` >= '2010-01-01 00:00:00' AND `__time` <= '2012-03-01 00:00:00'
160     AND `__time` < '2011-01-01 00:00:00'
161 POSTHOOK: type: QUERY
162 STAGE DEPENDENCIES:
163   Stage-0 is a root stage
164
165 STAGE PLANS:
166   Stage: Stage-0
167     Fetch Operator
168       limit: -1
169       Processor Tree:
170         TableScan
171           alias: druid_table_1
172           properties:
173             druid.query.json {"queryType":"select","dataSource":"wikipedia","descending":false,"intervals":["2010-01-01T08:00:00.000Z/2011-01-01T08:00:00.000Z"],"dimensions":[],"metrics":[],"granularity":"all","pagingSpec":{"threshold":16384,"fromNext":true},"context":{"druid.query.fetch":false}}
174             druid.query.type select
175           Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
176           Select Operator
177             expressions: __time (type: timestamp with local time zone)
178             outputColumnNames: _col0
179             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
180             ListSink
181
182 PREHOOK: query: EXPLAIN
183 SELECT `__time`
184 FROM druid_table_1
185 WHERE `__time` BETWEEN '2010-01-01 00:00:00' AND '2011-01-01 00:00:00'
186 PREHOOK: type: QUERY
187 POSTHOOK: query: EXPLAIN
188 SELECT `__time`
189 FROM druid_table_1
190 WHERE `__time` BETWEEN '2010-01-01 00:00:00' AND '2011-01-01 00:00:00'
191 POSTHOOK: type: QUERY
192 STAGE DEPENDENCIES:
193   Stage-0 is a root stage
194
195 STAGE PLANS:
196   Stage: Stage-0
197     Fetch Operator
198       limit: -1
199       Processor Tree:
200         TableScan
201           alias: druid_table_1
202           properties:
203             druid.query.json {"queryType":"select","dataSource":"wikipedia","descending":false,"intervals":["2010-01-01T08:00:00.000Z/2011-01-01T08:00:00.001Z"],"dimensions":[],"metrics":[],"granularity":"all","pagingSpec":{"threshold":16384,"fromNext":true},"context":{"druid.query.fetch":false}}
204             druid.query.type select
205           Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
206           Select Operator
207             expressions: __time (type: timestamp with local time zone)
208             outputColumnNames: _col0
209             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
210             ListSink
211
212 PREHOOK: query: EXPLAIN
213 SELECT `__time`
214 FROM druid_table_1
215 WHERE (`__time` BETWEEN '2010-01-01 00:00:00' AND '2011-01-01 00:00:00')
216     OR (`__time` BETWEEN '2012-01-01 00:00:00' AND '2013-01-01 00:00:00')
217 PREHOOK: type: QUERY
218 POSTHOOK: query: EXPLAIN
219 SELECT `__time`
220 FROM druid_table_1
221 WHERE (`__time` BETWEEN '2010-01-01 00:00:00' AND '2011-01-01 00:00:00')
222     OR (`__time` BETWEEN '2012-01-01 00:00:00' AND '2013-01-01 00:00:00')
223 POSTHOOK: type: QUERY
224 STAGE DEPENDENCIES:
225   Stage-0 is a root stage
226
227 STAGE PLANS:
228   Stage: Stage-0
229     Fetch Operator
230       limit: -1
231       Processor Tree:
232         TableScan
233           alias: druid_table_1
234           properties:
235             druid.query.json {"queryType":"select","dataSource":"wikipedia","descending":false,"intervals":["2010-01-01T08:00:00.000Z/2011-01-01T08:00:00.001Z","2012-01-01T08:00:00.000Z/2013-01-01T08:00:00.001Z"],"dimensions":[],"metrics":[],"granularity":"all","pagingSpec":{"threshold":16384,"fromNext":true},"context":{"druid.query.fetch":false}}
236             druid.query.type select
237           Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
238           Select Operator
239             expressions: __time (type: timestamp with local time zone)
240             outputColumnNames: _col0
241             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
242             ListSink
243
244 PREHOOK: query: EXPLAIN
245 SELECT `__time`
246 FROM druid_table_1
247 WHERE (`__time` BETWEEN '2010-01-01 00:00:00' AND '2011-01-01 00:00:00')
248     OR (`__time` BETWEEN '2010-06-01 00:00:00' AND '2012-01-01 00:00:00')
249 PREHOOK: type: QUERY
250 POSTHOOK: query: EXPLAIN
251 SELECT `__time`
252 FROM druid_table_1
253 WHERE (`__time` BETWEEN '2010-01-01 00:00:00' AND '2011-01-01 00:00:00')
254     OR (`__time` BETWEEN '2010-06-01 00:00:00' AND '2012-01-01 00:00:00')
255 POSTHOOK: type: QUERY
256 STAGE DEPENDENCIES:
257   Stage-0 is a root stage
258
259 STAGE PLANS:
260   Stage: Stage-0
261     Fetch Operator
262       limit: -1
263       Processor Tree:
264         TableScan
265           alias: druid_table_1
266           properties:
267             druid.query.json {"queryType":"select","dataSource":"wikipedia","descending":false,"intervals":["2010-01-01T08:00:00.000Z/2012-01-01T08:00:00.001Z"],"dimensions":[],"metrics":[],"granularity":"all","pagingSpec":{"threshold":16384,"fromNext":true},"context":{"druid.query.fetch":false}}
268             druid.query.type select
269           Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
270           Select Operator
271             expressions: __time (type: timestamp with local time zone)
272             outputColumnNames: _col0
273             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
274             ListSink
275
276 PREHOOK: query: EXPLAIN
277 SELECT `__time`
278 FROM druid_table_1
279 WHERE `__time` IN ('2010-01-01 00:00:00','2011-01-01 00:00:00')
280 PREHOOK: type: QUERY
281 POSTHOOK: query: EXPLAIN
282 SELECT `__time`
283 FROM druid_table_1
284 WHERE `__time` IN ('2010-01-01 00:00:00','2011-01-01 00:00:00')
285 POSTHOOK: type: QUERY
286 STAGE DEPENDENCIES:
287   Stage-0 is a root stage
288
289 STAGE PLANS:
290   Stage: Stage-0
291     Fetch Operator
292       limit: -1
293       Processor Tree:
294         TableScan
295           alias: druid_table_1
296           properties:
297             druid.query.json {"queryType":"select","dataSource":"wikipedia","descending":false,"intervals":["2010-01-01T08:00:00.000Z/2010-01-01T08:00:00.001Z","2011-01-01T08:00:00.000Z/2011-01-01T08:00:00.001Z"],"dimensions":[],"metrics":[],"granularity":"all","pagingSpec":{"threshold":16384,"fromNext":true},"context":{"druid.query.fetch":false}}
298             druid.query.type select
299           Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
300           Select Operator
301             expressions: __time (type: timestamp with local time zone)
302             outputColumnNames: _col0
303             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
304             ListSink
305
306 PREHOOK: query: EXPLAIN
307 SELECT `__time`, robot
308 FROM druid_table_1
309 WHERE robot = 'user1' AND `__time` IN ('2010-01-01 00:00:00','2011-01-01 00:00:00')
310 PREHOOK: type: QUERY
311 POSTHOOK: query: EXPLAIN
312 SELECT `__time`, robot
313 FROM druid_table_1
314 WHERE robot = 'user1' AND `__time` IN ('2010-01-01 00:00:00','2011-01-01 00:00:00')
315 POSTHOOK: type: QUERY
316 STAGE DEPENDENCIES:
317   Stage-0 is a root stage
318
319 STAGE PLANS:
320   Stage: Stage-0
321     Fetch Operator
322       limit: -1
323       Processor Tree:
324         TableScan
325           alias: druid_table_1
326           properties:
327             druid.query.json {"queryType":"select","dataSource":"wikipedia","descending":false,"intervals":["2010-01-01T08:00:00.000Z/2010-01-01T08:00:00.001Z","2011-01-01T08:00:00.000Z/2011-01-01T08:00:00.001Z"],"filter":{"type":"selector","dimension":"robot","value":"user1"},"dimensions":[],"metrics":[],"granularity":"all","pagingSpec":{"threshold":16384,"fromNext":true},"context":{"druid.query.fetch":false}}
328             druid.query.type select
329           Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
330           Select Operator
331             expressions: __time (type: timestamp with local time zone), 'user1' (type: string)
332             outputColumnNames: _col0, _col1
333             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
334             ListSink
335
336 PREHOOK: query: EXPLAIN
337 SELECT `__time`, robot
338 FROM druid_table_1
339 WHERE robot = 'user1' OR `__time` IN ('2010-01-01 00:00:00','2011-01-01 00:00:00')
340 PREHOOK: type: QUERY
341 POSTHOOK: query: EXPLAIN
342 SELECT `__time`, robot
343 FROM druid_table_1
344 WHERE robot = 'user1' OR `__time` IN ('2010-01-01 00:00:00','2011-01-01 00:00:00')
345 POSTHOOK: type: QUERY
346 STAGE DEPENDENCIES:
347   Stage-1 is a root stage
348   Stage-0 depends on stages: Stage-1
349
350 STAGE PLANS:
351   Stage: Stage-1
352     Map Reduce
353       Map Operator Tree:
354           TableScan
355             alias: druid_table_1
356             filterExpr: ((__time) IN (2010-01-01 00:00:00.0 US/Pacific, 2011-01-01 00:00:00.0 US/Pacific) or (robot = 'user1')) (type: boolean)
357             properties:
358               druid.query.json {"queryType":"select","dataSource":"wikipedia","descending":false,"intervals":["1900-01-01T00:00:00.000Z/3000-01-01T00:00:00.000Z"],"dimensions":["robot"],"metrics":[],"granularity":"all","pagingSpec":{"threshold":16384,"fromNext":true},"context":{"druid.query.fetch":false}}
359               druid.query.type select
360             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
361             Filter Operator
362               predicate: ((__time) IN (2010-01-01 00:00:00.0 US/Pacific, 2011-01-01 00:00:00.0 US/Pacific) or (robot = 'user1')) (type: boolean)
363               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
364               Select Operator
365                 expressions: __time (type: timestamp with local time zone), robot (type: string)
366                 outputColumnNames: _col0, _col1
367                 Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
368                 File Output Operator
369                   compressed: false
370                   Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
371                   table:
372                       input format: org.apache.hadoop.mapred.SequenceFileInputFormat
373                       output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
374                       serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
375
376   Stage: Stage-0
377     Fetch Operator
378       limit: -1
379       Processor Tree:
380         ListSink
381