PageRenderTime 39ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/release-0.0.0-rc0/hive/external/ql/src/test/results/clientpositive/union10.q.out

#
text | 305 lines | 291 code | 14 blank | 0 comment | 0 complexity | 539fa2b9609a2369b75632c109dcd6af MD5 | raw file
Possible License(s): Apache-2.0, BSD-3-Clause, JSON, CPL-1.0
  1. PREHOOK: query: -- union case: all subqueries are a map-reduce jobs, 3 way union, same input for all sub-queries, followed by filesink
  2. create table tmptable(key string, value int)
  3. PREHOOK: type: CREATETABLE
  4. POSTHOOK: query: -- union case: all subqueries are a map-reduce jobs, 3 way union, same input for all sub-queries, followed by filesink
  5. create table tmptable(key string, value int)
  6. POSTHOOK: type: CREATETABLE
  7. POSTHOOK: Output: default@tmptable
  8. PREHOOK: query: explain
  9. insert overwrite table tmptable
  10. select unionsrc.key, unionsrc.value FROM (select 'tst1' as key, count(1) as value from src s1
  11. UNION ALL
  12. select 'tst2' as key, count(1) as value from src s2
  13. UNION ALL
  14. select 'tst3' as key, count(1) as value from src s3) unionsrc
  15. PREHOOK: type: QUERY
  16. POSTHOOK: query: explain
  17. insert overwrite table tmptable
  18. select unionsrc.key, unionsrc.value FROM (select 'tst1' as key, count(1) as value from src s1
  19. UNION ALL
  20. select 'tst2' as key, count(1) as value from src s2
  21. UNION ALL
  22. select 'tst3' as key, count(1) as value from src s3) unionsrc
  23. POSTHOOK: type: QUERY
  24. ABSTRACT SYNTAX TREE:
  25. (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_UNION (TOK_UNION (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src) s1)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR 'tst1' key) (TOK_SELEXPR (TOK_FUNCTION count 1) value)))) (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src) s2)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR 'tst2' key) (TOK_SELEXPR (TOK_FUNCTION count 1) value))))) (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src) s3)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR 'tst3' key) (TOK_SELEXPR (TOK_FUNCTION count 1) value))))) unionsrc)) (TOK_INSERT (TOK_DESTINATION (TOK_TAB (TOK_TABNAME tmptable))) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL unionsrc) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL unionsrc) value)))))
  26. STAGE DEPENDENCIES:
  27. Stage-1 is a root stage
  28. Stage-2 depends on stages: Stage-1, Stage-7, Stage-8
  29. Stage-6 depends on stages: Stage-2 , consists of Stage-5, Stage-4
  30. Stage-5
  31. Stage-0 depends on stages: Stage-5, Stage-4
  32. Stage-3 depends on stages: Stage-0
  33. Stage-4
  34. Stage-7 is a root stage
  35. Stage-8 is a root stage
  36. STAGE PLANS:
  37. Stage: Stage-1
  38. Map Reduce
  39. Alias -> Map Operator Tree:
  40. null-subquery1-subquery1:unionsrc-subquery1-subquery1:s1
  41. TableScan
  42. alias: s1
  43. Select Operator
  44. Group By Operator
  45. aggregations:
  46. expr: count(1)
  47. bucketGroup: false
  48. mode: hash
  49. outputColumnNames: _col0
  50. Reduce Output Operator
  51. sort order:
  52. tag: -1
  53. value expressions:
  54. expr: _col0
  55. type: bigint
  56. Reduce Operator Tree:
  57. Group By Operator
  58. aggregations:
  59. expr: count(VALUE._col0)
  60. bucketGroup: false
  61. mode: mergepartial
  62. outputColumnNames: _col0
  63. Select Operator
  64. expressions:
  65. expr: 'tst1'
  66. type: string
  67. expr: _col0
  68. type: bigint
  69. outputColumnNames: _col0, _col1
  70. File Output Operator
  71. compressed: false
  72. GlobalTableId: 0
  73. table:
  74. input format: org.apache.hadoop.mapred.SequenceFileInputFormat
  75. output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
  76. Stage: Stage-2
  77. Map Reduce
  78. Alias -> Map Operator Tree:
  79. file:/tmp/sdong/hive_2011-02-10_17-48-28_233_2804783435602164161/-mr-10002
  80. Union
  81. Select Operator
  82. expressions:
  83. expr: _col0
  84. type: string
  85. expr: _col1
  86. type: bigint
  87. outputColumnNames: _col0, _col1
  88. Select Operator
  89. expressions:
  90. expr: _col0
  91. type: string
  92. expr: UDFToInteger(_col1)
  93. type: int
  94. outputColumnNames: _col0, _col1
  95. File Output Operator
  96. compressed: false
  97. GlobalTableId: 1
  98. table:
  99. input format: org.apache.hadoop.mapred.TextInputFormat
  100. output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
  101. serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
  102. name: default.tmptable
  103. file:/tmp/sdong/hive_2011-02-10_17-48-28_233_2804783435602164161/-mr-10004
  104. Union
  105. Select Operator
  106. expressions:
  107. expr: _col0
  108. type: string
  109. expr: _col1
  110. type: bigint
  111. outputColumnNames: _col0, _col1
  112. Select Operator
  113. expressions:
  114. expr: _col0
  115. type: string
  116. expr: UDFToInteger(_col1)
  117. type: int
  118. outputColumnNames: _col0, _col1
  119. File Output Operator
  120. compressed: false
  121. GlobalTableId: 1
  122. table:
  123. input format: org.apache.hadoop.mapred.TextInputFormat
  124. output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
  125. serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
  126. name: default.tmptable
  127. file:/tmp/sdong/hive_2011-02-10_17-48-28_233_2804783435602164161/-mr-10005
  128. Union
  129. Select Operator
  130. expressions:
  131. expr: _col0
  132. type: string
  133. expr: _col1
  134. type: bigint
  135. outputColumnNames: _col0, _col1
  136. Select Operator
  137. expressions:
  138. expr: _col0
  139. type: string
  140. expr: UDFToInteger(_col1)
  141. type: int
  142. outputColumnNames: _col0, _col1
  143. File Output Operator
  144. compressed: false
  145. GlobalTableId: 1
  146. table:
  147. input format: org.apache.hadoop.mapred.TextInputFormat
  148. output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
  149. serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
  150. name: default.tmptable
  151. Stage: Stage-6
  152. Conditional Operator
  153. Stage: Stage-5
  154. Move Operator
  155. files:
  156. hdfs directory: true
  157. destination: pfile:/data/users/sdong/www/open-source-hive1/build/ql/scratchdir/hive_2011-02-10_17-48-28_233_2804783435602164161/-ext-10000
  158. Stage: Stage-0
  159. Move Operator
  160. tables:
  161. replace: true
  162. table:
  163. input format: org.apache.hadoop.mapred.TextInputFormat
  164. output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
  165. serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
  166. name: default.tmptable
  167. Stage: Stage-3
  168. Stats-Aggr Operator
  169. Stage: Stage-4
  170. Map Reduce
  171. Alias -> Map Operator Tree:
  172. pfile:/data/users/sdong/www/open-source-hive1/build/ql/scratchdir/hive_2011-02-10_17-48-28_233_2804783435602164161/-ext-10003
  173. File Output Operator
  174. compressed: false
  175. GlobalTableId: 0
  176. table:
  177. input format: org.apache.hadoop.mapred.TextInputFormat
  178. output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
  179. serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
  180. name: default.tmptable
  181. Stage: Stage-7
  182. Map Reduce
  183. Alias -> Map Operator Tree:
  184. null-subquery1-subquery2:unionsrc-subquery1-subquery2:s2
  185. TableScan
  186. alias: s2
  187. Select Operator
  188. Group By Operator
  189. aggregations:
  190. expr: count(1)
  191. bucketGroup: false
  192. mode: hash
  193. outputColumnNames: _col0
  194. Reduce Output Operator
  195. sort order:
  196. tag: -1
  197. value expressions:
  198. expr: _col0
  199. type: bigint
  200. Reduce Operator Tree:
  201. Group By Operator
  202. aggregations:
  203. expr: count(VALUE._col0)
  204. bucketGroup: false
  205. mode: mergepartial
  206. outputColumnNames: _col0
  207. Select Operator
  208. expressions:
  209. expr: 'tst2'
  210. type: string
  211. expr: _col0
  212. type: bigint
  213. outputColumnNames: _col0, _col1
  214. File Output Operator
  215. compressed: false
  216. GlobalTableId: 0
  217. table:
  218. input format: org.apache.hadoop.mapred.SequenceFileInputFormat
  219. output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
  220. Stage: Stage-8
  221. Map Reduce
  222. Alias -> Map Operator Tree:
  223. null-subquery2:unionsrc-subquery2:s3
  224. TableScan
  225. alias: s3
  226. Select Operator
  227. Group By Operator
  228. aggregations:
  229. expr: count(1)
  230. bucketGroup: false
  231. mode: hash
  232. outputColumnNames: _col0
  233. Reduce Output Operator
  234. sort order:
  235. tag: -1
  236. value expressions:
  237. expr: _col0
  238. type: bigint
  239. Reduce Operator Tree:
  240. Group By Operator
  241. aggregations:
  242. expr: count(VALUE._col0)
  243. bucketGroup: false
  244. mode: mergepartial
  245. outputColumnNames: _col0
  246. Select Operator
  247. expressions:
  248. expr: 'tst3'
  249. type: string
  250. expr: _col0
  251. type: bigint
  252. outputColumnNames: _col0, _col1
  253. File Output Operator
  254. compressed: false
  255. GlobalTableId: 0
  256. table:
  257. input format: org.apache.hadoop.mapred.SequenceFileInputFormat
  258. output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
  259. PREHOOK: query: insert overwrite table tmptable
  260. select unionsrc.key, unionsrc.value FROM (select 'tst1' as key, count(1) as value from src s1
  261. UNION ALL
  262. select 'tst2' as key, count(1) as value from src s2
  263. UNION ALL
  264. select 'tst3' as key, count(1) as value from src s3) unionsrc
  265. PREHOOK: type: QUERY
  266. PREHOOK: Input: default@src
  267. PREHOOK: Output: default@tmptable
  268. POSTHOOK: query: insert overwrite table tmptable
  269. select unionsrc.key, unionsrc.value FROM (select 'tst1' as key, count(1) as value from src s1
  270. UNION ALL
  271. select 'tst2' as key, count(1) as value from src s2
  272. UNION ALL
  273. select 'tst3' as key, count(1) as value from src s3) unionsrc
  274. POSTHOOK: type: QUERY
  275. POSTHOOK: Input: default@src
  276. POSTHOOK: Output: default@tmptable
  277. POSTHOOK: Lineage: tmptable.key EXPRESSION []
  278. POSTHOOK: Lineage: tmptable.value EXPRESSION [(src)s1.null, (src)s2.null, (src)s3.null, ]
  279. PREHOOK: query: select * from tmptable x sort by x.key
  280. PREHOOK: type: QUERY
  281. PREHOOK: Input: default@tmptable
  282. PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_17-48-43_132_7439555334116715402/-mr-10000
  283. POSTHOOK: query: select * from tmptable x sort by x.key
  284. POSTHOOK: type: QUERY
  285. POSTHOOK: Input: default@tmptable
  286. POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_17-48-43_132_7439555334116715402/-mr-10000
  287. POSTHOOK: Lineage: tmptable.key EXPRESSION []
  288. POSTHOOK: Lineage: tmptable.value EXPRESSION [(src)s1.null, (src)s2.null, (src)s3.null, ]
  289. tst1 500
  290. tst2 500
  291. tst3 500