/branches/branch-0.2/hive/external/ql/src/test/results/clientpositive/semijoin.q.out

# · text · 3033 lines · 2910 code · 123 blank · 0 comment · 0 complexity · 0b0cff1fa9013fa5149d29c9c4992b92 MD5 · raw file

Large files are truncated click here to view the full file

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