PageRenderTime 50ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 1ms

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

#
text | 1849 lines | 1780 code | 69 blank | 0 comment | 0 complexity | 03ae5c4b271adb9683bda8460a989aca MD5 | raw file
Possible License(s): Apache-2.0, BSD-3-Clause, JSON, CPL-1.0

Large files files are truncated, but you can click here to view the full file

  1. PREHOOK: query: create table clustergroupby(key string, value string) partitioned by(ds string)
  2. PREHOOK: type: CREATETABLE
  3. POSTHOOK: query: create table clustergroupby(key string, value string) partitioned by(ds string)
  4. POSTHOOK: type: CREATETABLE
  5. POSTHOOK: Output: default@clustergroupby
  6. PREHOOK: query: describe extended clustergroupby
  7. PREHOOK: type: DESCTABLE
  8. POSTHOOK: query: describe extended clustergroupby
  9. POSTHOOK: type: DESCTABLE
  10. key string
  11. value string
  12. ds string
  13. Detailed Table Information Table(tableName:clustergroupby, dbName:default, owner:sdong, createTime:1297330264, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null), FieldSchema(name:value, type:string, comment:null), FieldSchema(name:ds, type:string, comment:null)], location:pfile:/data/users/sdong/www/open-source-hive1/build/ql/test/data/warehouse/clustergroupby, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null)], parameters:{transient_lastDdlTime=1297330264}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE)
  14. PREHOOK: query: insert overwrite table clustergroupby partition (ds='100') select key, value from src sort by key
  15. PREHOOK: type: QUERY
  16. PREHOOK: Input: default@src
  17. PREHOOK: Output: default@clustergroupby@ds=100
  18. POSTHOOK: query: insert overwrite table clustergroupby partition (ds='100') select key, value from src sort by key
  19. POSTHOOK: type: QUERY
  20. POSTHOOK: Input: default@src
  21. POSTHOOK: Output: default@clustergroupby@ds=100
  22. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  23. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  24. PREHOOK: query: explain
  25. select key, count(1) from clustergroupby where ds='100' group by key limit 10
  26. PREHOOK: type: QUERY
  27. POSTHOOK: query: explain
  28. select key, count(1) from clustergroupby where ds='100' group by key limit 10
  29. POSTHOOK: type: QUERY
  30. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  31. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  32. ABSTRACT SYNTAX TREE:
  33. (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME clustergroupby))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL key)) (TOK_SELEXPR (TOK_FUNCTION count 1))) (TOK_WHERE (= (TOK_TABLE_OR_COL ds) '100')) (TOK_GROUPBY (TOK_TABLE_OR_COL key)) (TOK_LIMIT 10)))
  34. STAGE DEPENDENCIES:
  35. Stage-1 is a root stage
  36. Stage-0 is a root stage
  37. STAGE PLANS:
  38. Stage: Stage-1
  39. Map Reduce
  40. Alias -> Map Operator Tree:
  41. clustergroupby
  42. TableScan
  43. alias: clustergroupby
  44. Filter Operator
  45. predicate:
  46. expr: (ds = '100')
  47. type: boolean
  48. Select Operator
  49. expressions:
  50. expr: key
  51. type: string
  52. outputColumnNames: key
  53. Group By Operator
  54. aggregations:
  55. expr: count(1)
  56. bucketGroup: false
  57. keys:
  58. expr: key
  59. type: string
  60. mode: hash
  61. outputColumnNames: _col0, _col1
  62. Reduce Output Operator
  63. key expressions:
  64. expr: _col0
  65. type: string
  66. sort order: +
  67. Map-reduce partition columns:
  68. expr: _col0
  69. type: string
  70. tag: -1
  71. value expressions:
  72. expr: _col1
  73. type: bigint
  74. Reduce Operator Tree:
  75. Group By Operator
  76. aggregations:
  77. expr: count(VALUE._col0)
  78. bucketGroup: false
  79. keys:
  80. expr: KEY._col0
  81. type: string
  82. mode: mergepartial
  83. outputColumnNames: _col0, _col1
  84. Select Operator
  85. expressions:
  86. expr: _col0
  87. type: string
  88. expr: _col1
  89. type: bigint
  90. outputColumnNames: _col0, _col1
  91. Limit
  92. File Output Operator
  93. compressed: false
  94. GlobalTableId: 0
  95. table:
  96. input format: org.apache.hadoop.mapred.TextInputFormat
  97. output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
  98. Stage: Stage-0
  99. Fetch Operator
  100. limit: 10
  101. PREHOOK: query: select key, count(1) from clustergroupby where ds='100' group by key limit 10
  102. PREHOOK: type: QUERY
  103. PREHOOK: Input: default@clustergroupby@ds=100
  104. PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-31-09_571_4785800205176349032/-mr-10000
  105. POSTHOOK: query: select key, count(1) from clustergroupby where ds='100' group by key limit 10
  106. POSTHOOK: type: QUERY
  107. POSTHOOK: Input: default@clustergroupby@ds=100
  108. POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-31-09_571_4785800205176349032/-mr-10000
  109. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  110. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  111. 0 3
  112. 10 1
  113. 100 2
  114. 103 2
  115. 104 2
  116. 105 1
  117. 11 1
  118. 111 1
  119. 113 2
  120. 114 1
  121. PREHOOK: query: alter table clustergroupby clustered by (key) into 1 buckets
  122. PREHOOK: type: ALTERTABLE_CLUSTER_SORT
  123. PREHOOK: Input: default@clustergroupby
  124. PREHOOK: Output: default@clustergroupby
  125. POSTHOOK: query: alter table clustergroupby clustered by (key) into 1 buckets
  126. POSTHOOK: type: ALTERTABLE_CLUSTER_SORT
  127. POSTHOOK: Input: default@clustergroupby
  128. POSTHOOK: Output: default@clustergroupby
  129. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  130. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  131. PREHOOK: query: describe extended clustergroupby
  132. PREHOOK: type: DESCTABLE
  133. POSTHOOK: query: describe extended clustergroupby
  134. POSTHOOK: type: DESCTABLE
  135. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  136. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  137. key string
  138. value string
  139. ds string
  140. Detailed Table Information Table(tableName:clustergroupby, dbName:default, owner:sdong, createTime:1297330264, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null), FieldSchema(name:value, type:string, comment:null), FieldSchema(name:ds, type:string, comment:null)], location:pfile:/data/users/sdong/www/open-source-hive1/build/ql/test/data/warehouse/clustergroupby, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[key], sortCols:[], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null)], parameters:{numPartitions=1, numFiles=1, last_modified_by=sdong, last_modified_time=1297330273, transient_lastDdlTime=1297330273, numRows=500, totalSize=5812}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE)
  141. PREHOOK: query: insert overwrite table clustergroupby partition (ds='101') select key, value from src distribute by key
  142. PREHOOK: type: QUERY
  143. PREHOOK: Input: default@src
  144. PREHOOK: Output: default@clustergroupby@ds=101
  145. POSTHOOK: query: insert overwrite table clustergroupby partition (ds='101') select key, value from src distribute by key
  146. POSTHOOK: type: QUERY
  147. POSTHOOK: Input: default@src
  148. POSTHOOK: Output: default@clustergroupby@ds=101
  149. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  150. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  151. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  152. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  153. PREHOOK: query: --normal--
  154. explain
  155. select key, count(1) from clustergroupby where ds='101' group by key limit 10
  156. PREHOOK: type: QUERY
  157. POSTHOOK: query: --normal--
  158. explain
  159. select key, count(1) from clustergroupby where ds='101' group by key limit 10
  160. POSTHOOK: type: QUERY
  161. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  162. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  163. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  164. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  165. ABSTRACT SYNTAX TREE:
  166. (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME clustergroupby))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL key)) (TOK_SELEXPR (TOK_FUNCTION count 1))) (TOK_WHERE (= (TOK_TABLE_OR_COL ds) '101')) (TOK_GROUPBY (TOK_TABLE_OR_COL key)) (TOK_LIMIT 10)))
  167. STAGE DEPENDENCIES:
  168. Stage-1 is a root stage
  169. Stage-0 is a root stage
  170. STAGE PLANS:
  171. Stage: Stage-1
  172. Map Reduce
  173. Alias -> Map Operator Tree:
  174. clustergroupby
  175. TableScan
  176. alias: clustergroupby
  177. Filter Operator
  178. predicate:
  179. expr: (ds = '101')
  180. type: boolean
  181. Select Operator
  182. expressions:
  183. expr: key
  184. type: string
  185. outputColumnNames: key
  186. Group By Operator
  187. aggregations:
  188. expr: count(1)
  189. bucketGroup: true
  190. keys:
  191. expr: key
  192. type: string
  193. mode: hash
  194. outputColumnNames: _col0, _col1
  195. Reduce Output Operator
  196. key expressions:
  197. expr: _col0
  198. type: string
  199. sort order: +
  200. Map-reduce partition columns:
  201. expr: _col0
  202. type: string
  203. tag: -1
  204. value expressions:
  205. expr: _col1
  206. type: bigint
  207. Reduce Operator Tree:
  208. Group By Operator
  209. aggregations:
  210. expr: count(VALUE._col0)
  211. bucketGroup: false
  212. keys:
  213. expr: KEY._col0
  214. type: string
  215. mode: mergepartial
  216. outputColumnNames: _col0, _col1
  217. Select Operator
  218. expressions:
  219. expr: _col0
  220. type: string
  221. expr: _col1
  222. type: bigint
  223. outputColumnNames: _col0, _col1
  224. Limit
  225. File Output Operator
  226. compressed: false
  227. GlobalTableId: 0
  228. table:
  229. input format: org.apache.hadoop.mapred.TextInputFormat
  230. output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
  231. Stage: Stage-0
  232. Fetch Operator
  233. limit: 10
  234. PREHOOK: query: select key, count(1) from clustergroupby where ds='101' group by key limit 10
  235. PREHOOK: type: QUERY
  236. PREHOOK: Input: default@clustergroupby@ds=101
  237. PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-31-18_109_2103582873568530260/-mr-10000
  238. POSTHOOK: query: select key, count(1) from clustergroupby where ds='101' group by key limit 10
  239. POSTHOOK: type: QUERY
  240. POSTHOOK: Input: default@clustergroupby@ds=101
  241. POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-31-18_109_2103582873568530260/-mr-10000
  242. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  243. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  244. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  245. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  246. 0 3
  247. 10 1
  248. 100 2
  249. 103 2
  250. 104 2
  251. 105 1
  252. 11 1
  253. 111 1
  254. 113 2
  255. 114 1
  256. PREHOOK: query: --function--
  257. explain
  258. select length(key), count(1) from clustergroupby where ds='101' group by length(key) limit 10
  259. PREHOOK: type: QUERY
  260. POSTHOOK: query: --function--
  261. explain
  262. select length(key), count(1) from clustergroupby where ds='101' group by length(key) limit 10
  263. POSTHOOK: type: QUERY
  264. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  265. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  266. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  267. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  268. ABSTRACT SYNTAX TREE:
  269. (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME clustergroupby))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION length (TOK_TABLE_OR_COL key))) (TOK_SELEXPR (TOK_FUNCTION count 1))) (TOK_WHERE (= (TOK_TABLE_OR_COL ds) '101')) (TOK_GROUPBY (TOK_FUNCTION length (TOK_TABLE_OR_COL key))) (TOK_LIMIT 10)))
  270. STAGE DEPENDENCIES:
  271. Stage-1 is a root stage
  272. Stage-0 is a root stage
  273. STAGE PLANS:
  274. Stage: Stage-1
  275. Map Reduce
  276. Alias -> Map Operator Tree:
  277. clustergroupby
  278. TableScan
  279. alias: clustergroupby
  280. Filter Operator
  281. predicate:
  282. expr: (ds = '101')
  283. type: boolean
  284. Select Operator
  285. expressions:
  286. expr: key
  287. type: string
  288. outputColumnNames: key
  289. Group By Operator
  290. aggregations:
  291. expr: count(1)
  292. bucketGroup: true
  293. keys:
  294. expr: length(key)
  295. type: int
  296. mode: hash
  297. outputColumnNames: _col0, _col1
  298. Reduce Output Operator
  299. key expressions:
  300. expr: _col0
  301. type: int
  302. sort order: +
  303. Map-reduce partition columns:
  304. expr: _col0
  305. type: int
  306. tag: -1
  307. value expressions:
  308. expr: _col1
  309. type: bigint
  310. Reduce Operator Tree:
  311. Group By Operator
  312. aggregations:
  313. expr: count(VALUE._col0)
  314. bucketGroup: false
  315. keys:
  316. expr: KEY._col0
  317. type: int
  318. mode: mergepartial
  319. outputColumnNames: _col0, _col1
  320. Select Operator
  321. expressions:
  322. expr: _col0
  323. type: int
  324. expr: _col1
  325. type: bigint
  326. outputColumnNames: _col0, _col1
  327. Limit
  328. File Output Operator
  329. compressed: false
  330. GlobalTableId: 0
  331. table:
  332. input format: org.apache.hadoop.mapred.TextInputFormat
  333. output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
  334. Stage: Stage-0
  335. Fetch Operator
  336. limit: 10
  337. PREHOOK: query: select length(key), count(1) from clustergroupby where ds='101' group by length(key) limit 10
  338. PREHOOK: type: QUERY
  339. PREHOOK: Input: default@clustergroupby@ds=101
  340. PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-31-21_764_2109263664206229253/-mr-10000
  341. POSTHOOK: query: select length(key), count(1) from clustergroupby where ds='101' group by length(key) limit 10
  342. POSTHOOK: type: QUERY
  343. POSTHOOK: Input: default@clustergroupby@ds=101
  344. POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-31-21_764_2109263664206229253/-mr-10000
  345. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  346. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  347. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  348. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  349. 1 10
  350. 2 74
  351. 3 416
  352. PREHOOK: query: explain
  353. select abs(length(key)), count(1) from clustergroupby where ds='101' group by abs(length(key)) limit 10
  354. PREHOOK: type: QUERY
  355. POSTHOOK: query: explain
  356. select abs(length(key)), count(1) from clustergroupby where ds='101' group by abs(length(key)) limit 10
  357. POSTHOOK: type: QUERY
  358. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  359. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  360. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  361. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  362. ABSTRACT SYNTAX TREE:
  363. (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME clustergroupby))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION abs (TOK_FUNCTION length (TOK_TABLE_OR_COL key)))) (TOK_SELEXPR (TOK_FUNCTION count 1))) (TOK_WHERE (= (TOK_TABLE_OR_COL ds) '101')) (TOK_GROUPBY (TOK_FUNCTION abs (TOK_FUNCTION length (TOK_TABLE_OR_COL key)))) (TOK_LIMIT 10)))
  364. STAGE DEPENDENCIES:
  365. Stage-1 is a root stage
  366. Stage-0 is a root stage
  367. STAGE PLANS:
  368. Stage: Stage-1
  369. Map Reduce
  370. Alias -> Map Operator Tree:
  371. clustergroupby
  372. TableScan
  373. alias: clustergroupby
  374. Filter Operator
  375. predicate:
  376. expr: (ds = '101')
  377. type: boolean
  378. Select Operator
  379. expressions:
  380. expr: key
  381. type: string
  382. outputColumnNames: key
  383. Group By Operator
  384. aggregations:
  385. expr: count(1)
  386. bucketGroup: true
  387. keys:
  388. expr: abs(length(key))
  389. type: int
  390. mode: hash
  391. outputColumnNames: _col0, _col1
  392. Reduce Output Operator
  393. key expressions:
  394. expr: _col0
  395. type: int
  396. sort order: +
  397. Map-reduce partition columns:
  398. expr: _col0
  399. type: int
  400. tag: -1
  401. value expressions:
  402. expr: _col1
  403. type: bigint
  404. Reduce Operator Tree:
  405. Group By Operator
  406. aggregations:
  407. expr: count(VALUE._col0)
  408. bucketGroup: false
  409. keys:
  410. expr: KEY._col0
  411. type: int
  412. mode: mergepartial
  413. outputColumnNames: _col0, _col1
  414. Select Operator
  415. expressions:
  416. expr: _col0
  417. type: int
  418. expr: _col1
  419. type: bigint
  420. outputColumnNames: _col0, _col1
  421. Limit
  422. File Output Operator
  423. compressed: false
  424. GlobalTableId: 0
  425. table:
  426. input format: org.apache.hadoop.mapred.TextInputFormat
  427. output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
  428. Stage: Stage-0
  429. Fetch Operator
  430. limit: 10
  431. PREHOOK: query: select abs(length(key)), count(1) from clustergroupby where ds='101' group by abs(length(key)) limit 10
  432. PREHOOK: type: QUERY
  433. PREHOOK: Input: default@clustergroupby@ds=101
  434. PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-31-26_110_671172006622360339/-mr-10000
  435. POSTHOOK: query: select abs(length(key)), count(1) from clustergroupby where ds='101' group by abs(length(key)) limit 10
  436. POSTHOOK: type: QUERY
  437. POSTHOOK: Input: default@clustergroupby@ds=101
  438. POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-31-26_110_671172006622360339/-mr-10000
  439. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  440. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  441. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  442. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  443. 1 10
  444. 2 74
  445. 3 416
  446. PREHOOK: query: --constant--
  447. explain
  448. select key, count(1) from clustergroupby where ds='101' group by key,3 limit 10
  449. PREHOOK: type: QUERY
  450. POSTHOOK: query: --constant--
  451. explain
  452. select key, count(1) from clustergroupby where ds='101' group by key,3 limit 10
  453. POSTHOOK: type: QUERY
  454. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  455. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  456. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  457. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  458. ABSTRACT SYNTAX TREE:
  459. (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME clustergroupby))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL key)) (TOK_SELEXPR (TOK_FUNCTION count 1))) (TOK_WHERE (= (TOK_TABLE_OR_COL ds) '101')) (TOK_GROUPBY (TOK_TABLE_OR_COL key) 3) (TOK_LIMIT 10)))
  460. STAGE DEPENDENCIES:
  461. Stage-1 is a root stage
  462. Stage-0 is a root stage
  463. STAGE PLANS:
  464. Stage: Stage-1
  465. Map Reduce
  466. Alias -> Map Operator Tree:
  467. clustergroupby
  468. TableScan
  469. alias: clustergroupby
  470. Filter Operator
  471. predicate:
  472. expr: (ds = '101')
  473. type: boolean
  474. Select Operator
  475. expressions:
  476. expr: key
  477. type: string
  478. outputColumnNames: key
  479. Group By Operator
  480. aggregations:
  481. expr: count(1)
  482. bucketGroup: true
  483. keys:
  484. expr: key
  485. type: string
  486. expr: 3
  487. type: int
  488. mode: hash
  489. outputColumnNames: _col0, _col1, _col2
  490. Reduce Output Operator
  491. key expressions:
  492. expr: _col0
  493. type: string
  494. expr: _col1
  495. type: int
  496. sort order: ++
  497. Map-reduce partition columns:
  498. expr: _col0
  499. type: string
  500. expr: _col1
  501. type: int
  502. tag: -1
  503. value expressions:
  504. expr: _col2
  505. type: bigint
  506. Reduce Operator Tree:
  507. Group By Operator
  508. aggregations:
  509. expr: count(VALUE._col0)
  510. bucketGroup: false
  511. keys:
  512. expr: KEY._col0
  513. type: string
  514. expr: KEY._col1
  515. type: int
  516. mode: mergepartial
  517. outputColumnNames: _col0, _col1, _col2
  518. Select Operator
  519. expressions:
  520. expr: _col0
  521. type: string
  522. expr: _col2
  523. type: bigint
  524. outputColumnNames: _col0, _col1
  525. Limit
  526. File Output Operator
  527. compressed: false
  528. GlobalTableId: 0
  529. table:
  530. input format: org.apache.hadoop.mapred.TextInputFormat
  531. output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
  532. Stage: Stage-0
  533. Fetch Operator
  534. limit: 10
  535. PREHOOK: query: select key, count(1) from clustergroupby where ds='101' group by key,3 limit 10
  536. PREHOOK: type: QUERY
  537. PREHOOK: Input: default@clustergroupby@ds=101
  538. PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-31-29_764_2397216315877695624/-mr-10000
  539. POSTHOOK: query: select key, count(1) from clustergroupby where ds='101' group by key,3 limit 10
  540. POSTHOOK: type: QUERY
  541. POSTHOOK: Input: default@clustergroupby@ds=101
  542. POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-31-29_764_2397216315877695624/-mr-10000
  543. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  544. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  545. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  546. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  547. 0 3
  548. 10 1
  549. 100 2
  550. 103 2
  551. 104 2
  552. 105 1
  553. 11 1
  554. 111 1
  555. 113 2
  556. 114 1
  557. PREHOOK: query: --subquery--
  558. explain
  559. select key, count(1) from (select value as key, key as value from clustergroupby where ds='101')subq group by key limit 10
  560. PREHOOK: type: QUERY
  561. POSTHOOK: query: --subquery--
  562. explain
  563. select key, count(1) from (select value as key, key as value from clustergroupby where ds='101')subq group by key limit 10
  564. POSTHOOK: type: QUERY
  565. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  566. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  567. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  568. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  569. ABSTRACT SYNTAX TREE:
  570. (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME clustergroupby))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL value) key) (TOK_SELEXPR (TOK_TABLE_OR_COL key) value)) (TOK_WHERE (= (TOK_TABLE_OR_COL ds) '101')))) subq)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL key)) (TOK_SELEXPR (TOK_FUNCTION count 1))) (TOK_GROUPBY (TOK_TABLE_OR_COL key)) (TOK_LIMIT 10)))
  571. STAGE DEPENDENCIES:
  572. Stage-1 is a root stage
  573. Stage-0 is a root stage
  574. STAGE PLANS:
  575. Stage: Stage-1
  576. Map Reduce
  577. Alias -> Map Operator Tree:
  578. subq:clustergroupby
  579. TableScan
  580. alias: clustergroupby
  581. Filter Operator
  582. predicate:
  583. expr: (ds = '101')
  584. type: boolean
  585. Select Operator
  586. expressions:
  587. expr: value
  588. type: string
  589. outputColumnNames: _col0
  590. Select Operator
  591. expressions:
  592. expr: _col0
  593. type: string
  594. outputColumnNames: _col0
  595. Group By Operator
  596. aggregations:
  597. expr: count(1)
  598. bucketGroup: false
  599. keys:
  600. expr: _col0
  601. type: string
  602. mode: hash
  603. outputColumnNames: _col0, _col1
  604. Reduce Output Operator
  605. key expressions:
  606. expr: _col0
  607. type: string
  608. sort order: +
  609. Map-reduce partition columns:
  610. expr: _col0
  611. type: string
  612. tag: -1
  613. value expressions:
  614. expr: _col1
  615. type: bigint
  616. Reduce Operator Tree:
  617. Group By Operator
  618. aggregations:
  619. expr: count(VALUE._col0)
  620. bucketGroup: false
  621. keys:
  622. expr: KEY._col0
  623. type: string
  624. mode: mergepartial
  625. outputColumnNames: _col0, _col1
  626. Select Operator
  627. expressions:
  628. expr: _col0
  629. type: string
  630. expr: _col1
  631. type: bigint
  632. outputColumnNames: _col0, _col1
  633. Limit
  634. File Output Operator
  635. compressed: false
  636. GlobalTableId: 0
  637. table:
  638. input format: org.apache.hadoop.mapred.TextInputFormat
  639. output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
  640. Stage: Stage-0
  641. Fetch Operator
  642. limit: 10
  643. PREHOOK: query: select key, count(1) from (select value as key, key as value from clustergroupby where ds='101')subq group by key limit 10
  644. PREHOOK: type: QUERY
  645. PREHOOK: Input: default@clustergroupby@ds=101
  646. PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-31-33_487_1431386357774433664/-mr-10000
  647. POSTHOOK: query: select key, count(1) from (select value as key, key as value from clustergroupby where ds='101')subq group by key limit 10
  648. POSTHOOK: type: QUERY
  649. POSTHOOK: Input: default@clustergroupby@ds=101
  650. POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-31-33_487_1431386357774433664/-mr-10000
  651. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  652. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  653. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  654. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  655. val_0 3
  656. val_10 1
  657. val_100 2
  658. val_103 2
  659. val_104 2
  660. val_105 1
  661. val_11 1
  662. val_111 1
  663. val_113 2
  664. val_114 1
  665. PREHOOK: query: explain
  666. select key, count(1) from clustergroupby group by key
  667. PREHOOK: type: QUERY
  668. POSTHOOK: query: explain
  669. select key, count(1) from clustergroupby group by key
  670. POSTHOOK: type: QUERY
  671. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  672. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  673. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  674. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  675. ABSTRACT SYNTAX TREE:
  676. (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME clustergroupby))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL key)) (TOK_SELEXPR (TOK_FUNCTION count 1))) (TOK_GROUPBY (TOK_TABLE_OR_COL key))))
  677. STAGE DEPENDENCIES:
  678. Stage-1 is a root stage
  679. Stage-0 is a root stage
  680. STAGE PLANS:
  681. Stage: Stage-1
  682. Map Reduce
  683. Alias -> Map Operator Tree:
  684. clustergroupby
  685. TableScan
  686. alias: clustergroupby
  687. Select Operator
  688. expressions:
  689. expr: key
  690. type: string
  691. outputColumnNames: key
  692. Group By Operator
  693. aggregations:
  694. expr: count(1)
  695. bucketGroup: false
  696. keys:
  697. expr: key
  698. type: string
  699. mode: hash
  700. outputColumnNames: _col0, _col1
  701. Reduce Output Operator
  702. key expressions:
  703. expr: _col0
  704. type: string
  705. sort order: +
  706. Map-reduce partition columns:
  707. expr: _col0
  708. type: string
  709. tag: -1
  710. value expressions:
  711. expr: _col1
  712. type: bigint
  713. Reduce Operator Tree:
  714. Group By Operator
  715. aggregations:
  716. expr: count(VALUE._col0)
  717. bucketGroup: false
  718. keys:
  719. expr: KEY._col0
  720. type: string
  721. mode: mergepartial
  722. outputColumnNames: _col0, _col1
  723. Select Operator
  724. expressions:
  725. expr: _col0
  726. type: string
  727. expr: _col1
  728. type: bigint
  729. outputColumnNames: _col0, _col1
  730. File Output Operator
  731. compressed: false
  732. GlobalTableId: 0
  733. table:
  734. input format: org.apache.hadoop.mapred.TextInputFormat
  735. output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
  736. Stage: Stage-0
  737. Fetch Operator
  738. limit: -1
  739. PREHOOK: query: select key, count(1) from clustergroupby group by key
  740. PREHOOK: type: QUERY
  741. PREHOOK: Input: default@clustergroupby@ds=100
  742. PREHOOK: Input: default@clustergroupby@ds=101
  743. PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-31-37_126_6695656183965608913/-mr-10000
  744. POSTHOOK: query: select key, count(1) from clustergroupby group by key
  745. POSTHOOK: type: QUERY
  746. POSTHOOK: Input: default@clustergroupby@ds=100
  747. POSTHOOK: Input: default@clustergroupby@ds=101
  748. POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-31-37_126_6695656183965608913/-mr-10000
  749. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  750. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  751. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  752. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  753. 0 6
  754. 10 2
  755. 100 4
  756. 103 4
  757. 104 4
  758. 105 2
  759. 11 2
  760. 111 2
  761. 113 4
  762. 114 2
  763. 116 2
  764. 118 4
  765. 119 6
  766. 12 4
  767. 120 4
  768. 125 4
  769. 126 2
  770. 128 6
  771. 129 4
  772. 131 2
  773. 133 2
  774. 134 4
  775. 136 2
  776. 137 4
  777. 138 8
  778. 143 2
  779. 145 2
  780. 146 4
  781. 149 4
  782. 15 4
  783. 150 2
  784. 152 4
  785. 153 2
  786. 155 2
  787. 156 2
  788. 157 2
  789. 158 2
  790. 160 2
  791. 162 2
  792. 163 2
  793. 164 4
  794. 165 4
  795. 166 2
  796. 167 6
  797. 168 2
  798. 169 8
  799. 17 2
  800. 170 2
  801. 172 4
  802. 174 4
  803. 175 4
  804. 176 4
  805. 177 2
  806. 178 2
  807. 179 4
  808. 18 4
  809. 180 2
  810. 181 2
  811. 183 2
  812. 186 2
  813. 187 6
  814. 189 2
  815. 19 2
  816. 190 2
  817. 191 4
  818. 192 2
  819. 193 6
  820. 194 2
  821. 195 4
  822. 196 2
  823. 197 4
  824. 199 6
  825. 2 2
  826. 20 2
  827. 200 4
  828. 201 2
  829. 202 2
  830. 203 4
  831. 205 4
  832. 207 4
  833. 208 6
  834. 209 4
  835. 213 4
  836. 214 2
  837. 216 4
  838. 217 4
  839. 218 2
  840. 219 4
  841. 221 4
  842. 222 2
  843. 223 4
  844. 224 4
  845. 226 2
  846. 228 2
  847. 229 4
  848. 230 10
  849. 233 4
  850. 235 2
  851. 237 4
  852. 238 4
  853. 239 4
  854. 24 4
  855. 241 2
  856. 242 4
  857. 244 2
  858. 247 2
  859. 248 2
  860. 249 2
  861. 252 2
  862. 255 4
  863. 256 4
  864. 257 2
  865. 258 2
  866. 26 4
  867. 260 2
  868. 262 2
  869. 263 2
  870. 265 4
  871. 266 2
  872. 27 2
  873. 272 4
  874. 273 6
  875. 274 2
  876. 275 2
  877. 277 8
  878. 278 4
  879. 28 2
  880. 280 4
  881. 281 4
  882. 282 4
  883. 283 2
  884. 284 2
  885. 285 2
  886. 286 2
  887. 287 2
  888. 288 4
  889. 289 2
  890. 291 2
  891. 292 2
  892. 296 2
  893. 298 6
  894. 30 2
  895. 302 2
  896. 305 2
  897. 306 2
  898. 307 4
  899. 308 2
  900. 309 4
  901. 310 2
  902. 311 6
  903. 315 2
  904. 316 6
  905. 317 4
  906. 318 6
  907. 321 4
  908. 322 4
  909. 323 2
  910. 325 4
  911. 327 6
  912. 33 2
  913. 331 4
  914. 332 2
  915. 333 4
  916. 335 2
  917. 336 2
  918. 338 2
  919. 339 2
  920. 34 2
  921. 341 2
  922. 342 4
  923. 344 4
  924. 345 2
  925. 348 10
  926. 35 6
  927. 351 2
  928. 353 4
  929. 356 2
  930. 360 2
  931. 362 2
  932. 364 2
  933. 365 2
  934. 366 2
  935. 367 4
  936. 368 2
  937. 369 6
  938. 37 4
  939. 373 2
  940. 374 2
  941. 375 2
  942. 377 2
  943. 378 2
  944. 379 2
  945. 382 4
  946. 384 6
  947. 386 2
  948. 389 2
  949. 392 2
  950. 393 2
  951. 394 2
  952. 395 4
  953. 396 6
  954. 397 4
  955. 399 4
  956. 4 2
  957. 400 2
  958. 401 10
  959. 402 2
  960. 403 6
  961. 404 4
  962. 406 8
  963. 407 2
  964. 409 6
  965. 41 2
  966. 411 2
  967. 413 4
  968. 414 4
  969. 417 6
  970. 418 2
  971. 419 2
  972. 42 4
  973. 421 2
  974. 424 4
  975. 427 2
  976. 429 4
  977. 43 2
  978. 430 6
  979. 431 6
  980. 432 2
  981. 435 2
  982. 436 2
  983. 437 2
  984. 438 6
  985. 439 4
  986. 44 2
  987. 443 2
  988. 444 2
  989. 446 2
  990. 448 2
  991. 449 2
  992. 452 2
  993. 453 2
  994. 454 6
  995. 455 2
  996. 457 2
  997. 458 4
  998. 459 4
  999. 460 2
  1000. 462 4
  1001. 463 4
  1002. 466 6
  1003. 467 2
  1004. 468 8
  1005. 469 10
  1006. 47 2
  1007. 470 2
  1008. 472 2
  1009. 475 2
  1010. 477 2
  1011. 478 4
  1012. 479 2
  1013. 480 6
  1014. 481 2
  1015. 482 2
  1016. 483 2
  1017. 484 2
  1018. 485 2
  1019. 487 2
  1020. 489 8
  1021. 490 2
  1022. 491 2
  1023. 492 4
  1024. 493 2
  1025. 494 2
  1026. 495 2
  1027. 496 2
  1028. 497 2
  1029. 498 6
  1030. 5 6
  1031. 51 4
  1032. 53 2
  1033. 54 2
  1034. 57 2
  1035. 58 4
  1036. 64 2
  1037. 65 2
  1038. 66 2
  1039. 67 4
  1040. 69 2
  1041. 70 6
  1042. 72 4
  1043. 74 2
  1044. 76 4
  1045. 77 2
  1046. 78 2
  1047. 8 2
  1048. 80 2
  1049. 82 2
  1050. 83 4
  1051. 84 4
  1052. 85 2
  1053. 86 2
  1054. 87 2
  1055. 9 2
  1056. 90 6
  1057. 92 2
  1058. 95 4
  1059. 96 2
  1060. 97 4
  1061. 98 4
  1062. PREHOOK: query: explain
  1063. select key, count(1) from clustergroupby group by key, 3
  1064. PREHOOK: type: QUERY
  1065. POSTHOOK: query: explain
  1066. select key, count(1) from clustergroupby group by key, 3
  1067. POSTHOOK: type: QUERY
  1068. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  1069. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  1070. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  1071. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  1072. ABSTRACT SYNTAX TREE:
  1073. (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME clustergroupby))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL key)) (TOK_SELEXPR (TOK_FUNCTION count 1))) (TOK_GROUPBY (TOK_TABLE_OR_COL key) 3)))
  1074. STAGE DEPENDENCIES:
  1075. Stage-1 is a root stage
  1076. Stage-0 is a root stage
  1077. STAGE PLANS:
  1078. Stage: Stage-1
  1079. Map Reduce
  1080. Alias -> Map Operator Tree:
  1081. clustergroupby
  1082. TableScan
  1083. alias: clustergroupby
  1084. Select Operator
  1085. expressions:
  1086. expr: key
  1087. type: string
  1088. outputColumnNames: key
  1089. Group By Operator
  1090. aggregations:
  1091. expr: count(1)
  1092. bucketGroup: false
  1093. keys:
  1094. expr: key
  1095. type: string
  1096. expr: 3
  1097. type: int
  1098. mode: hash
  1099. outputColumnNames: _col0, _col1, _col2
  1100. Reduce Output Operator
  1101. key expressions:
  1102. expr: _col0
  1103. type: string
  1104. expr: _col1
  1105. type: int
  1106. sort order: ++
  1107. Map-reduce partition columns:
  1108. expr: _col0
  1109. type: string
  1110. expr: _col1
  1111. type: int
  1112. tag: -1
  1113. value expressions:
  1114. expr: _col2
  1115. type: bigint
  1116. Reduce Operator Tree:
  1117. Group By Operator
  1118. aggregations:
  1119. expr: count(VALUE._col0)
  1120. bucketGroup: false
  1121. keys:
  1122. expr: KEY._col0
  1123. type: string
  1124. expr: KEY._col1
  1125. type: int
  1126. mode: mergepartial
  1127. outputColumnNames: _col0, _col1, _col2
  1128. Select Operator
  1129. expressions:
  1130. expr: _col0
  1131. type: string
  1132. expr: _col2
  1133. type: bigint
  1134. outputColumnNames: _col0, _col1
  1135. File Output Operator
  1136. compressed: false
  1137. GlobalTableId: 0
  1138. table:
  1139. input format: org.apache.hadoop.mapred.TextInputFormat
  1140. output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
  1141. Stage: Stage-0
  1142. Fetch Operator
  1143. limit: -1
  1144. PREHOOK: query: --sort columns--
  1145. alter table clustergroupby clustered by (value) sorted by (key, value) into 1 buckets
  1146. PREHOOK: type: ALTERTABLE_CLUSTER_SORT
  1147. PREHOOK: Input: default@clustergroupby
  1148. PREHOOK: Output: default@clustergroupby
  1149. POSTHOOK: query: --sort columns--
  1150. alter table clustergroupby clustered by (value) sorted by (key, value) into 1 buckets
  1151. POSTHOOK: type: ALTERTABLE_CLUSTER_SORT
  1152. POSTHOOK: Input: default@clustergroupby
  1153. POSTHOOK: Output: default@clustergroupby
  1154. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  1155. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  1156. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  1157. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  1158. PREHOOK: query: describe extended clustergroupby
  1159. PREHOOK: type: DESCTABLE
  1160. POSTHOOK: query: describe extended clustergroupby
  1161. POSTHOOK: type: DESCTABLE
  1162. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  1163. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  1164. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  1165. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  1166. key string
  1167. value string
  1168. ds string
  1169. Detailed Table Information Table(tableName:clustergroupby, dbName:default, owner:sdong, createTime:1297330264, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null), FieldSchema(name:value, type:string, comment:null), FieldSchema(name:ds, type:string, comment:null)], location:pfile:/data/users/sdong/www/open-source-hive1/build/ql/test/data/warehouse/clustergroupby, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[value], sortCols:[Order(col:key, order:1), Order(col:value, order:1)], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null)], parameters:{numPartitions=2, numFiles=2, last_modified_by=sdong, last_modified_time=1297330300, transient_lastDdlTime=1297330300, numRows=1000, totalSize=11624}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE)
  1170. PREHOOK: query: insert overwrite table clustergroupby partition (ds='102') select key, value from src distribute by value sort by key, value
  1171. PREHOOK: type: QUERY
  1172. PREHOOK: Input: default@src
  1173. PREHOOK: Output: default@clustergroupby@ds=102
  1174. POSTHOOK: query: insert overwrite table clustergroupby partition (ds='102') select key, value from src distribute by value sort by key, value
  1175. POSTHOOK: type: QUERY
  1176. POSTHOOK: Input: default@src
  1177. POSTHOOK: Output: default@clustergroupby@ds=102
  1178. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  1179. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  1180. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  1181. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  1182. POSTHOOK: Lineage: clustergroupby PARTITION(ds=102).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  1183. POSTHOOK: Lineage: clustergroupby PARTITION(ds=102).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  1184. PREHOOK: query: explain
  1185. select key, count(1) from clustergroupby where ds='102' group by key limit 10
  1186. PREHOOK: type: QUERY
  1187. POSTHOOK: query: explain
  1188. select key, count(1) from clustergroupby where ds='102' group by key limit 10
  1189. POSTHOOK: type: QUERY
  1190. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  1191. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  1192. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  1193. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  1194. POSTHOOK: Lineage: clustergroupby PARTITION(ds=102).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  1195. POSTHOOK: Lineage: clustergroupby PARTITION(ds=102).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  1196. ABSTRACT SYNTAX TREE:
  1197. (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME clustergroupby))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL key)) (TOK_SELEXPR (TOK_FUNCTION count 1))) (TOK_WHERE (= (TOK_TABLE_OR_COL ds) '102')) (TOK_GROUPBY (TOK_TABLE_OR_COL key)) (TOK_LIMIT 10)))
  1198. STAGE DEPENDENCIES:
  1199. Stage-1 is a root stage
  1200. Stage-0 is a root stage
  1201. STAGE PLANS:
  1202. Stage: Stage-1
  1203. Map Reduce
  1204. Alias -> Map Operator Tree:
  1205. clustergroupby
  1206. TableScan
  1207. alias: clustergroupby
  1208. Filter Operator
  1209. predicate:
  1210. expr: (ds = '102')
  1211. type: boolean
  1212. Select Operator
  1213. expressions:
  1214. expr: key
  1215. type: string
  1216. outputColumnNames: key
  1217. Group By Operator
  1218. aggregations:
  1219. expr: count(1)
  1220. bucketGroup: true
  1221. keys:
  1222. expr: key
  1223. type: string
  1224. mode: hash
  1225. outputColumnNames: _col0, _col1
  1226. Reduce Output Operator
  1227. key expressions:
  1228. expr: _col0
  1229. type: string
  1230. sort order: +
  1231. Map-reduce partition columns:
  1232. expr: _col0
  1233. type: string
  1234. tag: -1
  1235. value expressions:
  1236. expr: _col1
  1237. type: bigint
  1238. Reduce Operator Tree:
  1239. Group By Operator
  1240. aggregations:
  1241. expr: count(VALUE._col0)
  1242. bucketGroup: false
  1243. keys:
  1244. expr: KEY._col0
  1245. type: string
  1246. mode: mergepartial
  1247. outputColumnNames: _col0, _col1
  1248. Select Operator
  1249. expressions:
  1250. expr: _col0
  1251. type: string
  1252. expr: _col1
  1253. type: bigint
  1254. outputColumnNames: _col0, _col1
  1255. Limit
  1256. File Output Operator
  1257. compressed: false
  1258. GlobalTableId: 0
  1259. table:
  1260. input format: org.apache.hadoop.mapred.TextInputFormat
  1261. output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
  1262. Stage: Stage-0
  1263. Fetch Operator
  1264. limit: 10
  1265. PREHOOK: query: select key, count(1) from clustergroupby where ds='102' group by key limit 10
  1266. PREHOOK: type: QUERY
  1267. PREHOOK: Input: default@clustergroupby@ds=102
  1268. PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-31-45_956_2691533777800757183/-mr-10000
  1269. POSTHOOK: query: select key, count(1) from clustergroupby where ds='102' group by key limit 10
  1270. POSTHOOK: type: QUERY
  1271. POSTHOOK: Input: default@clustergroupby@ds=102
  1272. POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-31-45_956_2691533777800757183/-mr-10000
  1273. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  1274. POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  1275. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  1276. POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  1277. POSTHOOK: Lineage: clustergroupby PARTITION(ds=102).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  1278. POSTHOOK: Lineage: clustergroupby PARTITION(

Large files files are truncated, but you can click here to view the full file