PageRenderTime 48ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
text | 313 lines | 305 code | 8 blank | 0 comment | 0 complexity | efaa452beddc46c6b9c00b998b976dd6 MD5 | raw file
Possible License(s): Apache-2.0, BSD-3-Clause, JSON, CPL-1.0
  1. PREHOOK: query: CREATE TABLE dest1(key STRING, c1 INT, c2 STRING, C3 INT, c4 INT) STORED AS TEXTFILE
  2. PREHOOK: type: CREATETABLE
  3. POSTHOOK: query: CREATE TABLE dest1(key STRING, c1 INT, c2 STRING, C3 INT, c4 INT) STORED AS TEXTFILE
  4. POSTHOOK: type: CREATETABLE
  5. POSTHOOK: Output: default@dest1
  6. PREHOOK: query: EXPLAIN EXTENDED
  7. FROM srcpart src
  8. INSERT OVERWRITE TABLE dest1
  9. SELECT substr(src.key,1,1), count(DISTINCT substr(src.value,5)), concat(substr(src.key,1,1),sum(substr(src.value,5))), sum(DISTINCT substr(src.value, 5)), count(DISTINCT src.value)
  10. WHERE src.ds = '2008-04-08'
  11. GROUP BY substr(src.key,1,1)
  12. PREHOOK: type: QUERY
  13. POSTHOOK: query: EXPLAIN EXTENDED
  14. FROM srcpart src
  15. INSERT OVERWRITE TABLE dest1
  16. SELECT substr(src.key,1,1), count(DISTINCT substr(src.value,5)), concat(substr(src.key,1,1),sum(substr(src.value,5))), sum(DISTINCT substr(src.value, 5)), count(DISTINCT src.value)
  17. WHERE src.ds = '2008-04-08'
  18. GROUP BY substr(src.key,1,1)
  19. POSTHOOK: type: QUERY
  20. ABSTRACT SYNTAX TREE:
  21. (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME srcpart) src)) (TOK_INSERT (TOK_DESTINATION (TOK_TAB (TOK_TABNAME dest1))) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION substr (. (TOK_TABLE_OR_COL src) key) 1 1)) (TOK_SELEXPR (TOK_FUNCTIONDI count (TOK_FUNCTION substr (. (TOK_TABLE_OR_COL src) value) 5))) (TOK_SELEXPR (TOK_FUNCTION concat (TOK_FUNCTION substr (. (TOK_TABLE_OR_COL src) key) 1 1) (TOK_FUNCTION sum (TOK_FUNCTION substr (. (TOK_TABLE_OR_COL src) value) 5)))) (TOK_SELEXPR (TOK_FUNCTIONDI sum (TOK_FUNCTION substr (. (TOK_TABLE_OR_COL src) value) 5))) (TOK_SELEXPR (TOK_FUNCTIONDI count (. (TOK_TABLE_OR_COL src) value)))) (TOK_WHERE (= (. (TOK_TABLE_OR_COL src) ds) '2008-04-08')) (TOK_GROUPBY (TOK_FUNCTION substr (. (TOK_TABLE_OR_COL src) key) 1 1))))
  22. STAGE DEPENDENCIES:
  23. Stage-1 is a root stage
  24. Stage-0 depends on stages: Stage-1
  25. Stage-2 depends on stages: Stage-0
  26. STAGE PLANS:
  27. Stage: Stage-1
  28. Map Reduce
  29. Alias -> Map Operator Tree:
  30. src
  31. TableScan
  32. alias: src
  33. GatherStats: false
  34. Filter Operator
  35. isSamplingPred: false
  36. predicate:
  37. expr: (ds = '2008-04-08')
  38. type: boolean
  39. Select Operator
  40. expressions:
  41. expr: key
  42. type: string
  43. expr: value
  44. type: string
  45. outputColumnNames: key, value
  46. Group By Operator
  47. aggregations:
  48. expr: count(DISTINCT substr(value, 5))
  49. expr: sum(substr(value, 5))
  50. expr: sum(DISTINCT substr(value, 5))
  51. expr: count(DISTINCT value)
  52. bucketGroup: false
  53. keys:
  54. expr: substr(key, 1, 1)
  55. type: string
  56. expr: substr(value, 5)
  57. type: string
  58. expr: value
  59. type: string
  60. mode: hash
  61. outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
  62. Reduce Output Operator
  63. key expressions:
  64. expr: _col0
  65. type: string
  66. expr: _col1
  67. type: string
  68. expr: _col2
  69. type: string
  70. sort order: +++
  71. Map-reduce partition columns:
  72. expr: _col0
  73. type: string
  74. tag: -1
  75. value expressions:
  76. expr: _col3
  77. type: bigint
  78. expr: _col4
  79. type: double
  80. expr: _col5
  81. type: double
  82. expr: _col6
  83. type: bigint
  84. Needs Tagging: false
  85. Path -> Alias:
  86. pfile:/data/users/sdong/www/open-source-hive1/build/ql/test/data/warehouse/srcpart/ds=2008-04-08/hr=11 [src]
  87. pfile:/data/users/sdong/www/open-source-hive1/build/ql/test/data/warehouse/srcpart/ds=2008-04-08/hr=12 [src]
  88. Path -> Partition:
  89. pfile:/data/users/sdong/www/open-source-hive1/build/ql/test/data/warehouse/srcpart/ds=2008-04-08/hr=11
  90. Partition
  91. base file name: hr=11
  92. input format: org.apache.hadoop.mapred.TextInputFormat
  93. output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
  94. partition values:
  95. ds 2008-04-08
  96. hr 11
  97. properties:
  98. bucket_count -1
  99. columns key,value
  100. columns.types string:string
  101. file.inputformat org.apache.hadoop.mapred.TextInputFormat
  102. file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
  103. location pfile:/data/users/sdong/www/open-source-hive1/build/ql/test/data/warehouse/srcpart/ds=2008-04-08/hr=11
  104. name default.srcpart
  105. partition_columns ds/hr
  106. serialization.ddl struct srcpart { string key, string value}
  107. serialization.format 1
  108. serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
  109. transient_lastDdlTime 1297328959
  110. serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
  111. input format: org.apache.hadoop.mapred.TextInputFormat
  112. output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
  113. properties:
  114. bucket_count -1
  115. columns key,value
  116. columns.types string:string
  117. file.inputformat org.apache.hadoop.mapred.TextInputFormat
  118. file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
  119. location pfile:/data/users/sdong/www/open-source-hive1/build/ql/test/data/warehouse/srcpart
  120. name default.srcpart
  121. partition_columns ds/hr
  122. serialization.ddl struct srcpart { string key, string value}
  123. serialization.format 1
  124. serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
  125. transient_lastDdlTime 1297328959
  126. serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
  127. name: default.srcpart
  128. name: default.srcpart
  129. pfile:/data/users/sdong/www/open-source-hive1/build/ql/test/data/warehouse/srcpart/ds=2008-04-08/hr=12
  130. Partition
  131. base file name: hr=12
  132. input format: org.apache.hadoop.mapred.TextInputFormat
  133. output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
  134. partition values:
  135. ds 2008-04-08
  136. hr 12
  137. properties:
  138. bucket_count -1
  139. columns key,value
  140. columns.types string:string
  141. file.inputformat org.apache.hadoop.mapred.TextInputFormat
  142. file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
  143. location pfile:/data/users/sdong/www/open-source-hive1/build/ql/test/data/warehouse/srcpart/ds=2008-04-08/hr=12
  144. name default.srcpart
  145. partition_columns ds/hr
  146. serialization.ddl struct srcpart { string key, string value}
  147. serialization.format 1
  148. serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
  149. transient_lastDdlTime 1297328959
  150. serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
  151. input format: org.apache.hadoop.mapred.TextInputFormat
  152. output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
  153. properties:
  154. bucket_count -1
  155. columns key,value
  156. columns.types string:string
  157. file.inputformat org.apache.hadoop.mapred.TextInputFormat
  158. file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
  159. location pfile:/data/users/sdong/www/open-source-hive1/build/ql/test/data/warehouse/srcpart
  160. name default.srcpart
  161. partition_columns ds/hr
  162. serialization.ddl struct srcpart { string key, string value}
  163. serialization.format 1
  164. serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
  165. transient_lastDdlTime 1297328959
  166. serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
  167. name: default.srcpart
  168. name: default.srcpart
  169. Reduce Operator Tree:
  170. Group By Operator
  171. aggregations:
  172. expr: count(DISTINCT KEY._col1:0._col0)
  173. expr: sum(VALUE._col1)
  174. expr: sum(DISTINCT KEY._col1:1._col0)
  175. expr: count(DISTINCT KEY._col1:2._col0)
  176. bucketGroup: false
  177. keys:
  178. expr: KEY._col0
  179. type: string
  180. mode: mergepartial
  181. outputColumnNames: _col0, _col1, _col2, _col3, _col4
  182. Select Operator
  183. expressions:
  184. expr: _col0
  185. type: string
  186. expr: _col1
  187. type: bigint
  188. expr: concat(_col0, _col2)
  189. type: string
  190. expr: _col3
  191. type: double
  192. expr: _col4
  193. type: bigint
  194. outputColumnNames: _col0, _col1, _col2, _col3, _col4
  195. Select Operator
  196. expressions:
  197. expr: _col0
  198. type: string
  199. expr: UDFToInteger(_col1)
  200. type: int
  201. expr: _col2
  202. type: string
  203. expr: UDFToInteger(_col3)
  204. type: int
  205. expr: UDFToInteger(_col4)
  206. type: int
  207. outputColumnNames: _col0, _col1, _col2, _col3, _col4
  208. File Output Operator
  209. compressed: false
  210. GlobalTableId: 1
  211. directory: pfile:/data/users/sdong/www/open-source-hive1/build/ql/scratchdir/hive_2011-02-10_01-54-56_939_392063944204159853/-ext-10000
  212. NumFilesPerFileSink: 1
  213. Stats Publishing Key Prefix: pfile:/data/users/sdong/www/open-source-hive1/build/ql/scratchdir/hive_2011-02-10_01-54-56_939_392063944204159853/-ext-10000/
  214. table:
  215. input format: org.apache.hadoop.mapred.TextInputFormat
  216. output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
  217. properties:
  218. bucket_count -1
  219. columns key,c1,c2,c3,c4
  220. columns.types string:int:string:int:int
  221. file.inputformat org.apache.hadoop.mapred.TextInputFormat
  222. file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
  223. location pfile:/data/users/sdong/www/open-source-hive1/build/ql/test/data/warehouse/dest1
  224. name default.dest1
  225. serialization.ddl struct dest1 { string key, i32 c1, string c2, i32 c3, i32 c4}
  226. serialization.format 1
  227. serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
  228. transient_lastDdlTime 1297331696
  229. serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
  230. name: default.dest1
  231. TotalFiles: 1
  232. GatherStats: true
  233. MultiFileSpray: false
  234. Stage: Stage-0
  235. Move Operator
  236. tables:
  237. replace: true
  238. source: pfile:/data/users/sdong/www/open-source-hive1/build/ql/scratchdir/hive_2011-02-10_01-54-56_939_392063944204159853/-ext-10000
  239. table:
  240. input format: org.apache.hadoop.mapred.TextInputFormat
  241. output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
  242. properties:
  243. bucket_count -1
  244. columns key,c1,c2,c3,c4
  245. columns.types string:int:string:int:int
  246. file.inputformat org.apache.hadoop.mapred.TextInputFormat
  247. file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
  248. location pfile:/data/users/sdong/www/open-source-hive1/build/ql/test/data/warehouse/dest1
  249. name default.dest1
  250. serialization.ddl struct dest1 { string key, i32 c1, string c2, i32 c3, i32 c4}
  251. serialization.format 1
  252. serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
  253. transient_lastDdlTime 1297331696
  254. serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
  255. name: default.dest1
  256. tmp directory: pfile:/data/users/sdong/www/open-source-hive1/build/ql/scratchdir/hive_2011-02-10_01-54-56_939_392063944204159853/-ext-10001
  257. Stage: Stage-2
  258. Stats-Aggr Operator
  259. Stats Aggregation Key Prefix: pfile:/data/users/sdong/www/open-source-hive1/build/ql/scratchdir/hive_2011-02-10_01-54-56_939_392063944204159853/-ext-10000/
  260. PREHOOK: query: FROM srcpart src
  261. INSERT OVERWRITE TABLE dest1
  262. SELECT substr(src.key,1,1), count(DISTINCT substr(src.value,5)), concat(substr(src.key,1,1),sum(substr(src.value,5))), sum(DISTINCT substr(src.value, 5)), count(DISTINCT src.value)
  263. WHERE src.ds = '2008-04-08'
  264. GROUP BY substr(src.key,1,1)
  265. PREHOOK: type: QUERY
  266. PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
  267. PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=12
  268. PREHOOK: Output: default@dest1
  269. POSTHOOK: query: FROM srcpart src
  270. INSERT OVERWRITE TABLE dest1
  271. SELECT substr(src.key,1,1), count(DISTINCT substr(src.value,5)), concat(substr(src.key,1,1),sum(substr(src.value,5))), sum(DISTINCT substr(src.value, 5)), count(DISTINCT src.value)
  272. WHERE src.ds = '2008-04-08'
  273. GROUP BY substr(src.key,1,1)
  274. POSTHOOK: type: QUERY
  275. POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
  276. POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12
  277. POSTHOOK: Output: default@dest1
  278. POSTHOOK: Lineage: dest1.c1 EXPRESSION [(srcpart)src.FieldSchema(name:value, type:string, comment:default), ]
  279. POSTHOOK: Lineage: dest1.c2 EXPRESSION [(srcpart)src.FieldSchema(name:key, type:string, comment:default), (srcpart)src.FieldSchema(name:value, type:string, comment:default), ]
  280. POSTHOOK: Lineage: dest1.c3 EXPRESSION [(srcpart)src.FieldSchema(name:value, type:string, comment:default), ]
  281. POSTHOOK: Lineage: dest1.c4 EXPRESSION [(srcpart)src.FieldSchema(name:value, type:string, comment:default), ]
  282. POSTHOOK: Lineage: dest1.key EXPRESSION [(srcpart)src.FieldSchema(name:key, type:string, comment:default), ]
  283. PREHOOK: query: SELECT dest1.* FROM dest1
  284. PREHOOK: type: QUERY
  285. PREHOOK: Input: default@dest1
  286. PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-55-03_112_7822131255872092269/-mr-10000
  287. POSTHOOK: query: SELECT dest1.* FROM dest1
  288. POSTHOOK: type: QUERY
  289. POSTHOOK: Input: default@dest1
  290. POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-55-03_112_7822131255872092269/-mr-10000
  291. POSTHOOK: Lineage: dest1.c1 EXPRESSION [(srcpart)src.FieldSchema(name:value, type:string, comment:default), ]
  292. POSTHOOK: Lineage: dest1.c2 EXPRESSION [(srcpart)src.FieldSchema(name:key, type:string, comment:default), (srcpart)src.FieldSchema(name:value, type:string, comment:default), ]
  293. POSTHOOK: Lineage: dest1.c3 EXPRESSION [(srcpart)src.FieldSchema(name:value, type:string, comment:default), ]
  294. POSTHOOK: Lineage: dest1.c4 EXPRESSION [(srcpart)src.FieldSchema(name:value, type:string, comment:default), ]
  295. POSTHOOK: Lineage: dest1.key EXPRESSION [(srcpart)src.FieldSchema(name:key, type:string, comment:default), ]
  296. 0 1 00.0 0 1
  297. 1 71 132828.0 10044 71
  298. 2 69 251142.0 15780 69
  299. 3 62 364008.0 20119 62
  300. 4 74 4105526.0 30965 74
  301. 5 6 5794.0 278 6
  302. 6 5 6796.0 331 5
  303. 7 6 71470.0 447 6
  304. 8 8 81524.0 595 8
  305. 9 7 92094.0 577 7