PageRenderTime 20ms CodeModel.GetById 8ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
text | 1770 lines | 1709 code | 61 blank | 0 comment | 0 complexity | a18a8fab6eb72bd91c7c54813fd64a57 MD5 | raw file

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

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

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