ce6d0aafed8d8d008ea24168a43718cd5eb90797
[hive.git] / ql / src / test / results / clientpositive / druid_basic3.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: EXPLAIN
14 SELECT sum(added) + sum(delta) as a, language
15 FROM druid_table_1
16 GROUP BY language
17 ORDER BY a DESC
18 PREHOOK: type: QUERY
19 POSTHOOK: query: EXPLAIN
20 SELECT sum(added) + sum(delta) as a, language
21 FROM druid_table_1
22 GROUP BY language
23 ORDER BY a DESC
24 POSTHOOK: type: QUERY
25 STAGE DEPENDENCIES:
26   Stage-0 is a root stage
27
28 STAGE PLANS:
29   Stage: Stage-0
30     Fetch Operator
31       limit: -1
32       Processor Tree:
33         TableScan
34           alias: druid_table_1
35           properties:
36             druid.query.json {"queryType":"groupBy","dataSource":"wikipedia","granularity":"all","dimensions":[{"type":"default","dimension":"language"}],"limitSpec":{"type":"default","columns":[{"dimension":"postagg#0","direction":"descending","dimensionOrder":"numeric"}]},"aggregations":[{"type":"doubleSum","name":"$f1","fieldName":"added"},{"type":"doubleSum","name":"$f2","fieldName":"delta"}],"postAggregations":[{"type":"arithmetic","name":"postagg#0","fn":"+","fields":[{"type":"fieldAccess","name":"","fieldName":"$f1"},{"type":"fieldAccess","name":"","fieldName":"$f2"}]}],"intervals":["1900-01-01T00:00:00.000Z/3000-01-01T00:00:00.000Z"]}
37             druid.query.type groupBy
38           Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
39           Select Operator
40             expressions: postagg#0 (type: float), language (type: string)
41             outputColumnNames: _col0, _col1
42             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
43             ListSink
44
45 PREHOOK: query: EXPLAIN
46 SELECT sum(delta), sum(added) + sum(delta) AS a, language
47 FROM druid_table_1
48 GROUP BY language
49 ORDER BY a DESC
50 PREHOOK: type: QUERY
51 POSTHOOK: query: EXPLAIN
52 SELECT sum(delta), sum(added) + sum(delta) AS a, language
53 FROM druid_table_1
54 GROUP BY language
55 ORDER BY a DESC
56 POSTHOOK: type: QUERY
57 STAGE DEPENDENCIES:
58   Stage-0 is a root stage
59
60 STAGE PLANS:
61   Stage: Stage-0
62     Fetch Operator
63       limit: -1
64       Processor Tree:
65         TableScan
66           alias: druid_table_1
67           properties:
68             druid.query.json {"queryType":"groupBy","dataSource":"wikipedia","granularity":"all","dimensions":[{"type":"default","dimension":"language"}],"limitSpec":{"type":"default","columns":[{"dimension":"postagg#0","direction":"descending","dimensionOrder":"numeric"}]},"aggregations":[{"type":"doubleSum","name":"$f1","fieldName":"delta"},{"type":"doubleSum","name":"$f2","fieldName":"added"}],"postAggregations":[{"type":"arithmetic","name":"postagg#0","fn":"+","fields":[{"type":"fieldAccess","name":"","fieldName":"$f2"},{"type":"fieldAccess","name":"","fieldName":"$f1"}]}],"intervals":["1900-01-01T00:00:00.000Z/3000-01-01T00:00:00.000Z"]}
69             druid.query.type groupBy
70           Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
71           Select Operator
72             expressions: $f1 (type: float), postagg#0 (type: float), language (type: string)
73             outputColumnNames: _col0, _col1, _col2
74             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
75             ListSink
76
77 PREHOOK: query: EXPLAIN
78 SELECT language, sum(added) / sum(delta) AS a
79 FROM druid_table_1
80 GROUP BY language
81 ORDER BY a DESC
82 PREHOOK: type: QUERY
83 POSTHOOK: query: EXPLAIN
84 SELECT language, sum(added) / sum(delta) AS a
85 FROM druid_table_1
86 GROUP BY language
87 ORDER BY a DESC
88 POSTHOOK: type: QUERY
89 STAGE DEPENDENCIES:
90   Stage-0 is a root stage
91
92 STAGE PLANS:
93   Stage: Stage-0
94     Fetch Operator
95       limit: -1
96       Processor Tree:
97         TableScan
98           alias: druid_table_1
99           properties:
100             druid.query.json {"queryType":"groupBy","dataSource":"wikipedia","granularity":"all","dimensions":[{"type":"default","dimension":"language"}],"limitSpec":{"type":"default","columns":[{"dimension":"postagg#0","direction":"descending","dimensionOrder":"numeric"}]},"aggregations":[{"type":"doubleSum","name":"$f1","fieldName":"added"},{"type":"doubleSum","name":"$f2","fieldName":"delta"}],"postAggregations":[{"type":"arithmetic","name":"postagg#0","fn":"quotient","fields":[{"type":"fieldAccess","name":"","fieldName":"$f1"},{"type":"fieldAccess","name":"","fieldName":"$f2"}]}],"intervals":["1900-01-01T00:00:00.000Z/3000-01-01T00:00:00.000Z"]}
101             druid.query.type groupBy
102           Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
103           Select Operator
104             expressions: language (type: string), postagg#0 (type: float)
105             outputColumnNames: _col0, _col1
106             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
107             ListSink
108
109 PREHOOK: query: EXPLAIN
110 SELECT language, sum(added) * sum(delta) AS a
111 FROM druid_table_1
112 GROUP BY language
113 ORDER BY a DESC
114 PREHOOK: type: QUERY
115 POSTHOOK: query: EXPLAIN
116 SELECT language, sum(added) * sum(delta) AS a
117 FROM druid_table_1
118 GROUP BY language
119 ORDER BY a DESC
120 POSTHOOK: type: QUERY
121 STAGE DEPENDENCIES:
122   Stage-0 is a root stage
123
124 STAGE PLANS:
125   Stage: Stage-0
126     Fetch Operator
127       limit: -1
128       Processor Tree:
129         TableScan
130           alias: druid_table_1
131           properties:
132             druid.query.json {"queryType":"groupBy","dataSource":"wikipedia","granularity":"all","dimensions":[{"type":"default","dimension":"language"}],"limitSpec":{"type":"default","columns":[{"dimension":"postagg#0","direction":"descending","dimensionOrder":"numeric"}]},"aggregations":[{"type":"doubleSum","name":"$f1","fieldName":"added"},{"type":"doubleSum","name":"$f2","fieldName":"delta"}],"postAggregations":[{"type":"arithmetic","name":"postagg#0","fn":"*","fields":[{"type":"fieldAccess","name":"","fieldName":"$f1"},{"type":"fieldAccess","name":"","fieldName":"$f2"}]}],"intervals":["1900-01-01T00:00:00.000Z/3000-01-01T00:00:00.000Z"]}
133             druid.query.type groupBy
134           Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
135           Select Operator
136             expressions: language (type: string), postagg#0 (type: float)
137             outputColumnNames: _col0, _col1
138             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
139             ListSink
140
141 PREHOOK: query: EXPLAIN
142 SELECT language, sum(added) - sum(delta) AS a
143 FROM druid_table_1
144 GROUP BY language
145 ORDER BY a DESC
146 PREHOOK: type: QUERY
147 POSTHOOK: query: EXPLAIN
148 SELECT language, sum(added) - sum(delta) AS a
149 FROM druid_table_1
150 GROUP BY language
151 ORDER BY a DESC
152 POSTHOOK: type: QUERY
153 STAGE DEPENDENCIES:
154   Stage-0 is a root stage
155
156 STAGE PLANS:
157   Stage: Stage-0
158     Fetch Operator
159       limit: -1
160       Processor Tree:
161         TableScan
162           alias: druid_table_1
163           properties:
164             druid.query.json {"queryType":"groupBy","dataSource":"wikipedia","granularity":"all","dimensions":[{"type":"default","dimension":"language"}],"limitSpec":{"type":"default","columns":[{"dimension":"postagg#0","direction":"descending","dimensionOrder":"numeric"}]},"aggregations":[{"type":"doubleSum","name":"$f1","fieldName":"added"},{"type":"doubleSum","name":"$f2","fieldName":"delta"}],"postAggregations":[{"type":"arithmetic","name":"postagg#0","fn":"-","fields":[{"type":"fieldAccess","name":"","fieldName":"$f1"},{"type":"fieldAccess","name":"","fieldName":"$f2"}]}],"intervals":["1900-01-01T00:00:00.000Z/3000-01-01T00:00:00.000Z"]}
165             druid.query.type groupBy
166           Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
167           Select Operator
168             expressions: language (type: string), postagg#0 (type: float)
169             outputColumnNames: _col0, _col1
170             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
171             ListSink
172
173 PREHOOK: query: EXPLAIN
174 SELECT language, sum(added) + 100 AS a
175 FROM druid_table_1
176 GROUP BY language
177 ORDER BY a DESC
178 PREHOOK: type: QUERY
179 POSTHOOK: query: EXPLAIN
180 SELECT language, sum(added) + 100 AS a
181 FROM druid_table_1
182 GROUP BY language
183 ORDER BY a DESC
184 POSTHOOK: type: QUERY
185 STAGE DEPENDENCIES:
186   Stage-1 is a root stage
187   Stage-0 depends on stages: Stage-1
188
189 STAGE PLANS:
190   Stage: Stage-1
191     Map Reduce
192       Map Operator Tree:
193           TableScan
194             alias: druid_table_1
195             properties:
196               druid.query.json {"queryType":"groupBy","dataSource":"wikipedia","granularity":"all","dimensions":[{"type":"default","dimension":"language"}],"limitSpec":{"type":"default"},"aggregations":[{"type":"doubleSum","name":"$f1","fieldName":"added"}],"intervals":["1900-01-01T00:00:00.000Z/3000-01-01T00:00:00.000Z"]}
197               druid.query.type groupBy
198             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
199             Select Operator
200               expressions: language (type: string), ($f1 + 100.0) (type: double)
201               outputColumnNames: _col0, _col1
202               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
203               Reduce Output Operator
204                 key expressions: _col1 (type: double)
205                 sort order: -
206                 Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
207                 value expressions: _col0 (type: string)
208       Reduce Operator Tree:
209         Select Operator
210           expressions: VALUE._col0 (type: string), KEY.reducesinkkey0 (type: double)
211           outputColumnNames: _col0, _col1
212           Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
213           File Output Operator
214             compressed: false
215             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
216             table:
217                 input format: org.apache.hadoop.mapred.SequenceFileInputFormat
218                 output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
219                 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
220
221   Stage: Stage-0
222     Fetch Operator
223       limit: -1
224       Processor Tree:
225         ListSink
226
227 PREHOOK: query: EXPLAIN
228 SELECT language, -1 * (a + b) AS c
229 FROM (
230   SELECT (sum(added)-sum(delta)) / (count(*) * 3) AS a, sum(deleted) AS b, language
231   FROM druid_table_1
232   GROUP BY language) subq
233 ORDER BY c DESC
234 PREHOOK: type: QUERY
235 POSTHOOK: query: EXPLAIN
236 SELECT language, -1 * (a + b) AS c
237 FROM (
238   SELECT (sum(added)-sum(delta)) / (count(*) * 3) AS a, sum(deleted) AS b, language
239   FROM druid_table_1
240   GROUP BY language) subq
241 ORDER BY c DESC
242 POSTHOOK: type: QUERY
243 STAGE DEPENDENCIES:
244   Stage-1 is a root stage
245   Stage-0 depends on stages: Stage-1
246
247 STAGE PLANS:
248   Stage: Stage-1
249     Map Reduce
250       Map Operator Tree:
251           TableScan
252             alias: druid_table_1
253             properties:
254               druid.query.json {"queryType":"groupBy","dataSource":"wikipedia","granularity":"all","dimensions":[{"type":"default","dimension":"language"}],"limitSpec":{"type":"default"},"aggregations":[{"type":"doubleSum","name":"$f1","fieldName":"added"},{"type":"doubleSum","name":"$f2","fieldName":"delta"},{"type":"count","name":"$f3"},{"type":"doubleSum","name":"$f4","fieldName":"deleted"}],"intervals":["1900-01-01T00:00:00.000Z/3000-01-01T00:00:00.000Z"]}
255               druid.query.type groupBy
256             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
257             Select Operator
258               expressions: language (type: string), (-1.0 * ((($f1 - $f2) / UDFToDouble(($f3 * 3))) + $f4)) (type: double)
259               outputColumnNames: _col0, _col1
260               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
261               Reduce Output Operator
262                 key expressions: _col1 (type: double)
263                 sort order: -
264                 Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
265                 value expressions: _col0 (type: string)
266       Reduce Operator Tree:
267         Select Operator
268           expressions: VALUE._col0 (type: string), KEY.reducesinkkey0 (type: double)
269           outputColumnNames: _col0, _col1
270           Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
271           File Output Operator
272             compressed: false
273             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
274             table:
275                 input format: org.apache.hadoop.mapred.SequenceFileInputFormat
276                 output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
277                 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
278
279   Stage: Stage-0
280     Fetch Operator
281       limit: -1
282       Processor Tree:
283         ListSink
284
285 PREHOOK: query: EXPLAIN
286 SELECT language, robot, sum(added) - sum(delta) AS a
287 FROM druid_table_1
288 WHERE extract (week from `__time`) IN (10,11)
289 GROUP BY language, robot
290 PREHOOK: type: QUERY
291 POSTHOOK: query: EXPLAIN
292 SELECT language, robot, sum(added) - sum(delta) AS a
293 FROM druid_table_1
294 WHERE extract (week from `__time`) IN (10,11)
295 GROUP BY language, robot
296 POSTHOOK: type: QUERY
297 STAGE DEPENDENCIES:
298   Stage-1 is a root stage
299   Stage-0 depends on stages: Stage-1
300
301 STAGE PLANS:
302   Stage: Stage-1
303     Map Reduce
304       Map Operator Tree:
305           TableScan
306             alias: druid_table_1
307             properties:
308               druid.query.json {"queryType":"groupBy","dataSource":"wikipedia","granularity":"all","dimensions":[{"type":"default","dimension":"robot"},{"type":"default","dimension":"language"}],"limitSpec":{"type":"default"},"filter":{"type":"in","dimension":"__time","values":["10","11"],"extractionFn":{"type":"timeFormat","format":"w","timeZone":"US/Pacific","locale":"en-US"}},"aggregations":[{"type":"doubleSum","name":"$f2","fieldName":"added"},{"type":"doubleSum","name":"$f3","fieldName":"delta"}],"intervals":["1900-01-01T00:00:00.000Z/3000-01-01T00:00:00.000Z"]}
309               druid.query.type groupBy
310             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
311             Select Operator
312               expressions: language (type: string), robot (type: string), ($f2 - $f3) (type: float)
313               outputColumnNames: _col0, _col1, _col2
314               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
315               File Output Operator
316                 compressed: false
317                 Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
318                 table:
319                     input format: org.apache.hadoop.mapred.SequenceFileInputFormat
320                     output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
321                     serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
322
323   Stage: Stage-0
324     Fetch Operator
325       limit: -1
326       Processor Tree:
327         ListSink
328
329 PREHOOK: query: EXPLAIN
330 SELECT language, sum(delta) / count(*) AS a
331 FROM druid_table_1
332 GROUP BY language
333 ORDER BY a DESC
334 PREHOOK: type: QUERY
335 POSTHOOK: query: EXPLAIN
336 SELECT language, sum(delta) / count(*) AS a
337 FROM druid_table_1
338 GROUP BY language
339 ORDER BY a DESC
340 POSTHOOK: type: QUERY
341 STAGE DEPENDENCIES:
342   Stage-1 is a root stage
343   Stage-0 depends on stages: Stage-1
344
345 STAGE PLANS:
346   Stage: Stage-1
347     Map Reduce
348       Map Operator Tree:
349           TableScan
350             alias: druid_table_1
351             properties:
352               druid.query.json {"queryType":"groupBy","dataSource":"wikipedia","granularity":"all","dimensions":[{"type":"default","dimension":"language"}],"limitSpec":{"type":"default"},"aggregations":[{"type":"doubleSum","name":"$f1","fieldName":"delta"},{"type":"count","name":"$f2"}],"intervals":["1900-01-01T00:00:00.000Z/3000-01-01T00:00:00.000Z"]}
353               druid.query.type groupBy
354             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
355             Select Operator
356               expressions: language (type: string), ($f1 / UDFToDouble($f2)) (type: double)
357               outputColumnNames: _col0, _col1
358               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
359               Reduce Output Operator
360                 key expressions: _col1 (type: double)
361                 sort order: -
362                 Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
363                 value expressions: _col0 (type: string)
364       Reduce Operator Tree:
365         Select Operator
366           expressions: VALUE._col0 (type: string), KEY.reducesinkkey0 (type: double)
367           outputColumnNames: _col0, _col1
368           Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
369           File Output Operator
370             compressed: false
371             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
372             table:
373                 input format: org.apache.hadoop.mapred.SequenceFileInputFormat
374                 output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
375                 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
376
377   Stage: Stage-0
378     Fetch Operator
379       limit: -1
380       Processor Tree:
381         ListSink
382
383 PREHOOK: query: EXPLAIN
384 SELECT language, sum(added) / sum(delta) AS a,
385        CASE WHEN sum(deleted)=0 THEN 1.0 ELSE sum(deleted) END AS b
386 FROM druid_table_1
387 GROUP BY language
388 ORDER BY a DESC
389 PREHOOK: type: QUERY
390 POSTHOOK: query: EXPLAIN
391 SELECT language, sum(added) / sum(delta) AS a,
392        CASE WHEN sum(deleted)=0 THEN 1.0 ELSE sum(deleted) END AS b
393 FROM druid_table_1
394 GROUP BY language
395 ORDER BY a DESC
396 POSTHOOK: type: QUERY
397 STAGE DEPENDENCIES:
398   Stage-1 is a root stage
399   Stage-0 depends on stages: Stage-1
400
401 STAGE PLANS:
402   Stage: Stage-1
403     Map Reduce
404       Map Operator Tree:
405           TableScan
406             alias: druid_table_1
407             properties:
408               druid.query.json {"queryType":"groupBy","dataSource":"wikipedia","granularity":"all","dimensions":[{"type":"default","dimension":"language"}],"limitSpec":{"type":"default","columns":[{"dimension":"postagg#0","direction":"descending","dimensionOrder":"numeric"}]},"aggregations":[{"type":"doubleSum","name":"$f1","fieldName":"added"},{"type":"doubleSum","name":"$f2","fieldName":"delta"},{"type":"doubleSum","name":"$f3","fieldName":"deleted"}],"postAggregations":[{"type":"arithmetic","name":"postagg#0","fn":"quotient","fields":[{"type":"fieldAccess","name":"","fieldName":"$f1"},{"type":"fieldAccess","name":"","fieldName":"$f2"}]}],"intervals":["1900-01-01T00:00:00.000Z/3000-01-01T00:00:00.000Z"]}
409               druid.query.type groupBy
410             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
411             Select Operator
412               expressions: language (type: string), postagg#0 (type: float), CASE WHEN (($f3 = 0.0)) THEN (1) ELSE ($f3) END (type: float)
413               outputColumnNames: _col0, _col1, _col2
414               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
415               File Output Operator
416                 compressed: false
417                 Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
418                 table:
419                     input format: org.apache.hadoop.mapred.SequenceFileInputFormat
420                     output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
421                     serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
422
423   Stage: Stage-0
424     Fetch Operator
425       limit: -1
426       Processor Tree:
427         ListSink
428
429 PREHOOK: query: EXPLAIN
430 SELECT language, a, a - b as c
431 FROM (
432   SELECT language, sum(added) + 100 AS a, sum(delta) AS b
433   FROM druid_table_1
434   GROUP BY language) subq
435 ORDER BY a DESC
436 PREHOOK: type: QUERY
437 POSTHOOK: query: EXPLAIN
438 SELECT language, a, a - b as c
439 FROM (
440   SELECT language, sum(added) + 100 AS a, sum(delta) AS b
441   FROM druid_table_1
442   GROUP BY language) subq
443 ORDER BY a DESC
444 POSTHOOK: type: QUERY
445 STAGE DEPENDENCIES:
446   Stage-1 is a root stage
447   Stage-0 depends on stages: Stage-1
448
449 STAGE PLANS:
450   Stage: Stage-1
451     Map Reduce
452       Map Operator Tree:
453           TableScan
454             alias: druid_table_1
455             properties:
456               druid.query.json {"queryType":"groupBy","dataSource":"wikipedia","granularity":"all","dimensions":[{"type":"default","dimension":"language"}],"limitSpec":{"type":"default"},"aggregations":[{"type":"doubleSum","name":"$f1","fieldName":"added"},{"type":"doubleSum","name":"$f2","fieldName":"delta"}],"intervals":["1900-01-01T00:00:00.000Z/3000-01-01T00:00:00.000Z"]}
457               druid.query.type groupBy
458             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
459             Select Operator
460               expressions: language (type: string), ($f1 + 100.0) (type: double), (($f1 + 100.0) - $f2) (type: double)
461               outputColumnNames: _col0, _col1, _col2
462               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
463               Reduce Output Operator
464                 key expressions: _col1 (type: double)
465                 sort order: -
466                 Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
467                 value expressions: _col0 (type: string), _col2 (type: double)
468       Reduce Operator Tree:
469         Select Operator
470           expressions: VALUE._col0 (type: string), KEY.reducesinkkey0 (type: double), VALUE._col1 (type: double)
471           outputColumnNames: _col0, _col1, _col2
472           Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
473           File Output Operator
474             compressed: false
475             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
476             table:
477                 input format: org.apache.hadoop.mapred.SequenceFileInputFormat
478                 output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
479                 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
480
481   Stage: Stage-0
482     Fetch Operator
483       limit: -1
484       Processor Tree:
485         ListSink
486
487 PREHOOK: query: EXPLAIN
488 SELECT language, robot, "A"
489 FROM (
490   SELECT sum(added) - sum(delta) AS a, language, robot
491   FROM druid_table_1
492   GROUP BY language, robot ) subq
493 ORDER BY "A"
494 LIMIT 5
495 PREHOOK: type: QUERY
496 POSTHOOK: query: EXPLAIN
497 SELECT language, robot, "A"
498 FROM (
499   SELECT sum(added) - sum(delta) AS a, language, robot
500   FROM druid_table_1
501   GROUP BY language, robot ) subq
502 ORDER BY "A"
503 LIMIT 5
504 POSTHOOK: type: QUERY
505 STAGE DEPENDENCIES:
506   Stage-0 is a root stage
507
508 STAGE PLANS:
509   Stage: Stage-0
510     Fetch Operator
511       limit: 5
512       Processor Tree:
513         TableScan
514           alias: druid_table_1
515           properties:
516             druid.query.json {"queryType":"groupBy","dataSource":"wikipedia","granularity":"all","dimensions":[{"type":"default","dimension":"robot"},{"type":"default","dimension":"language"}],"limitSpec":{"type":"default"},"aggregations":[{"type":"longSum","name":"dummy_agg","fieldName":"dummy_agg"}],"intervals":["1900-01-01T00:00:00.000Z/3000-01-01T00:00:00.000Z"]}
517             druid.query.type groupBy
518           Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
519           Select Operator
520             expressions: language (type: string), robot (type: string), 'A' (type: string)
521             outputColumnNames: _col0, _col1, _col2
522             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
523             Limit
524               Number of rows: 5
525               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
526               ListSink
527
528 PREHOOK: query: EXPLAIN
529 SELECT language, robot, "A"
530 FROM (
531   SELECT language, sum(added) + sum(delta) AS a, robot
532   FROM druid_table_1
533   GROUP BY language, robot) subq
534 ORDER BY robot, language
535 LIMIT 5
536 PREHOOK: type: QUERY
537 POSTHOOK: query: EXPLAIN
538 SELECT language, robot, "A"
539 FROM (
540   SELECT language, sum(added) + sum(delta) AS a, robot
541   FROM druid_table_1
542   GROUP BY language, robot) subq
543 ORDER BY robot, language
544 LIMIT 5
545 POSTHOOK: type: QUERY
546 STAGE DEPENDENCIES:
547   Stage-0 is a root stage
548
549 STAGE PLANS:
550   Stage: Stage-0
551     Fetch Operator
552       limit: -1
553       Processor Tree:
554         TableScan
555           alias: druid_table_1
556           properties:
557             druid.query.json {"queryType":"groupBy","dataSource":"wikipedia","granularity":"all","dimensions":[{"type":"default","dimension":"robot"},{"type":"default","dimension":"language"}],"limitSpec":{"type":"default","limit":5,"columns":[{"dimension":"robot","direction":"ascending","dimensionOrder":"alphanumeric"},{"dimension":"language","direction":"ascending","dimensionOrder":"alphanumeric"}]},"aggregations":[{"type":"longSum","name":"dummy_agg","fieldName":"dummy_agg"}],"intervals":["1900-01-01T00:00:00.000Z/3000-01-01T00:00:00.000Z"]}
558             druid.query.type groupBy
559           Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
560           Select Operator
561             expressions: language (type: string), robot (type: string), 'A' (type: string)
562             outputColumnNames: _col0, _col1, _col2
563             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
564             ListSink
565