PageRenderTime 33ms CodeModel.GetById 17ms app.highlight 10ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
text | 1849 lines | 1780 code | 69 blank | 0 comment | 0 complexity | 03ae5c4b271adb9683bda8460a989aca MD5 | raw file

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

   1PREHOOK: query: create table clustergroupby(key string, value string) partitioned by(ds string)
   2PREHOOK: type: CREATETABLE
   3POSTHOOK: query: create table clustergroupby(key string, value string) partitioned by(ds string)
   4POSTHOOK: type: CREATETABLE
   5POSTHOOK: Output: default@clustergroupby
   6PREHOOK: query: describe extended clustergroupby
   7PREHOOK: type: DESCTABLE
   8POSTHOOK: query: describe extended clustergroupby
   9POSTHOOK: type: DESCTABLE
  10key	string	
  11value	string	
  12ds	string	
  13	 	 
  14Detailed Table Information	Table(tableName:clustergroupby, dbName:default, owner:sdong, createTime:1297330264, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null), FieldSchema(name:value, type:string, comment:null), FieldSchema(name:ds, type:string, comment:null)], location:pfile:/data/users/sdong/www/open-source-hive1/build/ql/test/data/warehouse/clustergroupby, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null)], parameters:{transient_lastDdlTime=1297330264}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE)	
  15PREHOOK: query: insert overwrite table clustergroupby partition (ds='100') select key, value from src sort by key
  16PREHOOK: type: QUERY
  17PREHOOK: Input: default@src
  18PREHOOK: Output: default@clustergroupby@ds=100
  19POSTHOOK: query: insert overwrite table clustergroupby partition (ds='100') select key, value from src sort by key
  20POSTHOOK: type: QUERY
  21POSTHOOK: Input: default@src
  22POSTHOOK: Output: default@clustergroupby@ds=100
  23POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  24POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  25PREHOOK: query: explain
  26select key, count(1) from clustergroupby where ds='100' group by key limit 10
  27PREHOOK: type: QUERY
  28POSTHOOK: query: explain
  29select key, count(1) from clustergroupby where ds='100' group by key limit 10
  30POSTHOOK: type: QUERY
  31POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
  32POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
  33ABSTRACT SYNTAX TREE:
  34  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME clustergroupby))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL key)) (TOK_SELEXPR (TOK_FUNCTION count 1))) (TOK_WHERE (= (TOK_TABLE_OR_COL ds) '100')) (TOK_GROUPBY (TOK_TABLE_OR_COL key)) (TOK_LIMIT 10)))
  35
  36STAGE DEPENDENCIES:
  37  Stage-1 is a root stage
  38  Stage-0 is a root stage
  39
  40STAGE PLANS:
  41  Stage: Stage-1
  42    Map Reduce
  43      Alias -> Map Operator Tree:
  44        clustergroupby 
  45          TableScan
  46            alias: clustergroupby
  47            Filter Operator
  48              predicate:
  49                  expr: (ds = '100')
  50                  type: boolean
  51              Select Operator
  52                expressions:
  53                      expr: key
  54                      type: string
  55                outputColumnNames: key
  56                Group By Operator
  57                  aggregations:
  58                        expr: count(1)
  59                  bucketGroup: false
  60                  keys:
  61                        expr: key
  62                        type: string
  63                  mode: hash
  64                  outputColumnNames: _col0, _col1
  65                  Reduce Output Operator
  66                    key expressions:
  67                          expr: _col0
  68                          type: string
  69                    sort order: +
  70                    Map-reduce partition columns:
  71                          expr: _col0
  72                          type: string
  73                    tag: -1
  74                    value expressions:
  75                          expr: _col1
  76                          type: bigint
  77      Reduce Operator Tree:
  78        Group By Operator
  79          aggregations:
  80                expr: count(VALUE._col0)
  81          bucketGroup: false
  82          keys:
  83                expr: KEY._col0
  84                type: string
  85          mode: mergepartial
  86          outputColumnNames: _col0, _col1
  87          Select Operator
  88            expressions:
  89                  expr: _col0
  90                  type: string
  91                  expr: _col1
  92                  type: bigint
  93            outputColumnNames: _col0, _col1
  94            Limit
  95              File Output Operator
  96                compressed: false
  97                GlobalTableId: 0
  98                table:
  99                    input format: org.apache.hadoop.mapred.TextInputFormat
 100                    output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
 101
 102  Stage: Stage-0
 103    Fetch Operator
 104      limit: 10
 105
 106
 107PREHOOK: query: select key, count(1) from clustergroupby where ds='100' group by key limit 10
 108PREHOOK: type: QUERY
 109PREHOOK: Input: default@clustergroupby@ds=100
 110PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-31-09_571_4785800205176349032/-mr-10000
 111POSTHOOK: query: select key, count(1) from clustergroupby where ds='100' group by key limit 10
 112POSTHOOK: type: QUERY
 113POSTHOOK: Input: default@clustergroupby@ds=100
 114POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-31-09_571_4785800205176349032/-mr-10000
 115POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 116POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 1170	3
 11810	1
 119100	2
 120103	2
 121104	2
 122105	1
 12311	1
 124111	1
 125113	2
 126114	1
 127PREHOOK: query: alter table clustergroupby clustered by (key) into 1 buckets
 128PREHOOK: type: ALTERTABLE_CLUSTER_SORT
 129PREHOOK: Input: default@clustergroupby
 130PREHOOK: Output: default@clustergroupby
 131POSTHOOK: query: alter table clustergroupby clustered by (key) into 1 buckets
 132POSTHOOK: type: ALTERTABLE_CLUSTER_SORT
 133POSTHOOK: Input: default@clustergroupby
 134POSTHOOK: Output: default@clustergroupby
 135POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 136POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 137PREHOOK: query: describe extended clustergroupby
 138PREHOOK: type: DESCTABLE
 139POSTHOOK: query: describe extended clustergroupby
 140POSTHOOK: type: DESCTABLE
 141POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 142POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 143key	string	
 144value	string	
 145ds	string	
 146	 	 
 147Detailed Table Information	Table(tableName:clustergroupby, dbName:default, owner:sdong, createTime:1297330264, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null), FieldSchema(name:value, type:string, comment:null), FieldSchema(name:ds, type:string, comment:null)], location:pfile:/data/users/sdong/www/open-source-hive1/build/ql/test/data/warehouse/clustergroupby, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[key], sortCols:[], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null)], parameters:{numPartitions=1, numFiles=1, last_modified_by=sdong, last_modified_time=1297330273, transient_lastDdlTime=1297330273, numRows=500, totalSize=5812}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE)	
 148PREHOOK: query: insert overwrite table clustergroupby partition (ds='101') select key, value from src distribute by key
 149PREHOOK: type: QUERY
 150PREHOOK: Input: default@src
 151PREHOOK: Output: default@clustergroupby@ds=101
 152POSTHOOK: query: insert overwrite table clustergroupby partition (ds='101') select key, value from src distribute by key
 153POSTHOOK: type: QUERY
 154POSTHOOK: Input: default@src
 155POSTHOOK: Output: default@clustergroupby@ds=101
 156POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 157POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 158POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 159POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 160PREHOOK: query: --normal--
 161explain
 162select key, count(1) from clustergroupby  where ds='101'  group by key limit 10
 163PREHOOK: type: QUERY
 164POSTHOOK: query: --normal--
 165explain
 166select key, count(1) from clustergroupby  where ds='101'  group by key limit 10
 167POSTHOOK: type: QUERY
 168POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 169POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 170POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 171POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 172ABSTRACT SYNTAX TREE:
 173  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME clustergroupby))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL key)) (TOK_SELEXPR (TOK_FUNCTION count 1))) (TOK_WHERE (= (TOK_TABLE_OR_COL ds) '101')) (TOK_GROUPBY (TOK_TABLE_OR_COL key)) (TOK_LIMIT 10)))
 174
 175STAGE DEPENDENCIES:
 176  Stage-1 is a root stage
 177  Stage-0 is a root stage
 178
 179STAGE PLANS:
 180  Stage: Stage-1
 181    Map Reduce
 182      Alias -> Map Operator Tree:
 183        clustergroupby 
 184          TableScan
 185            alias: clustergroupby
 186            Filter Operator
 187              predicate:
 188                  expr: (ds = '101')
 189                  type: boolean
 190              Select Operator
 191                expressions:
 192                      expr: key
 193                      type: string
 194                outputColumnNames: key
 195                Group By Operator
 196                  aggregations:
 197                        expr: count(1)
 198                  bucketGroup: true
 199                  keys:
 200                        expr: key
 201                        type: string
 202                  mode: hash
 203                  outputColumnNames: _col0, _col1
 204                  Reduce Output Operator
 205                    key expressions:
 206                          expr: _col0
 207                          type: string
 208                    sort order: +
 209                    Map-reduce partition columns:
 210                          expr: _col0
 211                          type: string
 212                    tag: -1
 213                    value expressions:
 214                          expr: _col1
 215                          type: bigint
 216      Reduce Operator Tree:
 217        Group By Operator
 218          aggregations:
 219                expr: count(VALUE._col0)
 220          bucketGroup: false
 221          keys:
 222                expr: KEY._col0
 223                type: string
 224          mode: mergepartial
 225          outputColumnNames: _col0, _col1
 226          Select Operator
 227            expressions:
 228                  expr: _col0
 229                  type: string
 230                  expr: _col1
 231                  type: bigint
 232            outputColumnNames: _col0, _col1
 233            Limit
 234              File Output Operator
 235                compressed: false
 236                GlobalTableId: 0
 237                table:
 238                    input format: org.apache.hadoop.mapred.TextInputFormat
 239                    output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
 240
 241  Stage: Stage-0
 242    Fetch Operator
 243      limit: 10
 244
 245
 246PREHOOK: query: select key, count(1) from clustergroupby  where ds='101' group by key limit 10
 247PREHOOK: type: QUERY
 248PREHOOK: Input: default@clustergroupby@ds=101
 249PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-31-18_109_2103582873568530260/-mr-10000
 250POSTHOOK: query: select key, count(1) from clustergroupby  where ds='101' group by key limit 10
 251POSTHOOK: type: QUERY
 252POSTHOOK: Input: default@clustergroupby@ds=101
 253POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-31-18_109_2103582873568530260/-mr-10000
 254POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 255POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 256POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 257POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 2580	3
 25910	1
 260100	2
 261103	2
 262104	2
 263105	1
 26411	1
 265111	1
 266113	2
 267114	1
 268PREHOOK: query: --function--
 269explain
 270select length(key), count(1) from clustergroupby  where ds='101'  group by length(key) limit 10
 271PREHOOK: type: QUERY
 272POSTHOOK: query: --function--
 273explain
 274select length(key), count(1) from clustergroupby  where ds='101'  group by length(key) limit 10
 275POSTHOOK: type: QUERY
 276POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 277POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 278POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 279POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 280ABSTRACT SYNTAX TREE:
 281  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME clustergroupby))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION length (TOK_TABLE_OR_COL key))) (TOK_SELEXPR (TOK_FUNCTION count 1))) (TOK_WHERE (= (TOK_TABLE_OR_COL ds) '101')) (TOK_GROUPBY (TOK_FUNCTION length (TOK_TABLE_OR_COL key))) (TOK_LIMIT 10)))
 282
 283STAGE DEPENDENCIES:
 284  Stage-1 is a root stage
 285  Stage-0 is a root stage
 286
 287STAGE PLANS:
 288  Stage: Stage-1
 289    Map Reduce
 290      Alias -> Map Operator Tree:
 291        clustergroupby 
 292          TableScan
 293            alias: clustergroupby
 294            Filter Operator
 295              predicate:
 296                  expr: (ds = '101')
 297                  type: boolean
 298              Select Operator
 299                expressions:
 300                      expr: key
 301                      type: string
 302                outputColumnNames: key
 303                Group By Operator
 304                  aggregations:
 305                        expr: count(1)
 306                  bucketGroup: true
 307                  keys:
 308                        expr: length(key)
 309                        type: int
 310                  mode: hash
 311                  outputColumnNames: _col0, _col1
 312                  Reduce Output Operator
 313                    key expressions:
 314                          expr: _col0
 315                          type: int
 316                    sort order: +
 317                    Map-reduce partition columns:
 318                          expr: _col0
 319                          type: int
 320                    tag: -1
 321                    value expressions:
 322                          expr: _col1
 323                          type: bigint
 324      Reduce Operator Tree:
 325        Group By Operator
 326          aggregations:
 327                expr: count(VALUE._col0)
 328          bucketGroup: false
 329          keys:
 330                expr: KEY._col0
 331                type: int
 332          mode: mergepartial
 333          outputColumnNames: _col0, _col1
 334          Select Operator
 335            expressions:
 336                  expr: _col0
 337                  type: int
 338                  expr: _col1
 339                  type: bigint
 340            outputColumnNames: _col0, _col1
 341            Limit
 342              File Output Operator
 343                compressed: false
 344                GlobalTableId: 0
 345                table:
 346                    input format: org.apache.hadoop.mapred.TextInputFormat
 347                    output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
 348
 349  Stage: Stage-0
 350    Fetch Operator
 351      limit: 10
 352
 353
 354PREHOOK: query: select length(key), count(1) from clustergroupby  where ds='101' group by length(key) limit 10
 355PREHOOK: type: QUERY
 356PREHOOK: Input: default@clustergroupby@ds=101
 357PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-31-21_764_2109263664206229253/-mr-10000
 358POSTHOOK: query: select length(key), count(1) from clustergroupby  where ds='101' group by length(key) limit 10
 359POSTHOOK: type: QUERY
 360POSTHOOK: Input: default@clustergroupby@ds=101
 361POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-31-21_764_2109263664206229253/-mr-10000
 362POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 363POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 364POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 365POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 3661	10
 3672	74
 3683	416
 369PREHOOK: query: explain
 370select abs(length(key)), count(1) from clustergroupby  where ds='101'  group by abs(length(key)) limit 10
 371PREHOOK: type: QUERY
 372POSTHOOK: query: explain
 373select abs(length(key)), count(1) from clustergroupby  where ds='101'  group by abs(length(key)) limit 10
 374POSTHOOK: type: QUERY
 375POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 376POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 377POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 378POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 379ABSTRACT SYNTAX TREE:
 380  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME clustergroupby))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION abs (TOK_FUNCTION length (TOK_TABLE_OR_COL key)))) (TOK_SELEXPR (TOK_FUNCTION count 1))) (TOK_WHERE (= (TOK_TABLE_OR_COL ds) '101')) (TOK_GROUPBY (TOK_FUNCTION abs (TOK_FUNCTION length (TOK_TABLE_OR_COL key)))) (TOK_LIMIT 10)))
 381
 382STAGE DEPENDENCIES:
 383  Stage-1 is a root stage
 384  Stage-0 is a root stage
 385
 386STAGE PLANS:
 387  Stage: Stage-1
 388    Map Reduce
 389      Alias -> Map Operator Tree:
 390        clustergroupby 
 391          TableScan
 392            alias: clustergroupby
 393            Filter Operator
 394              predicate:
 395                  expr: (ds = '101')
 396                  type: boolean
 397              Select Operator
 398                expressions:
 399                      expr: key
 400                      type: string
 401                outputColumnNames: key
 402                Group By Operator
 403                  aggregations:
 404                        expr: count(1)
 405                  bucketGroup: true
 406                  keys:
 407                        expr: abs(length(key))
 408                        type: int
 409                  mode: hash
 410                  outputColumnNames: _col0, _col1
 411                  Reduce Output Operator
 412                    key expressions:
 413                          expr: _col0
 414                          type: int
 415                    sort order: +
 416                    Map-reduce partition columns:
 417                          expr: _col0
 418                          type: int
 419                    tag: -1
 420                    value expressions:
 421                          expr: _col1
 422                          type: bigint
 423      Reduce Operator Tree:
 424        Group By Operator
 425          aggregations:
 426                expr: count(VALUE._col0)
 427          bucketGroup: false
 428          keys:
 429                expr: KEY._col0
 430                type: int
 431          mode: mergepartial
 432          outputColumnNames: _col0, _col1
 433          Select Operator
 434            expressions:
 435                  expr: _col0
 436                  type: int
 437                  expr: _col1
 438                  type: bigint
 439            outputColumnNames: _col0, _col1
 440            Limit
 441              File Output Operator
 442                compressed: false
 443                GlobalTableId: 0
 444                table:
 445                    input format: org.apache.hadoop.mapred.TextInputFormat
 446                    output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
 447
 448  Stage: Stage-0
 449    Fetch Operator
 450      limit: 10
 451
 452
 453PREHOOK: query: select abs(length(key)), count(1) from clustergroupby  where ds='101' group by abs(length(key)) limit 10
 454PREHOOK: type: QUERY
 455PREHOOK: Input: default@clustergroupby@ds=101
 456PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-31-26_110_671172006622360339/-mr-10000
 457POSTHOOK: query: select abs(length(key)), count(1) from clustergroupby  where ds='101' group by abs(length(key)) limit 10
 458POSTHOOK: type: QUERY
 459POSTHOOK: Input: default@clustergroupby@ds=101
 460POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-31-26_110_671172006622360339/-mr-10000
 461POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 462POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 463POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 464POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 4651	10
 4662	74
 4673	416
 468PREHOOK: query: --constant--
 469explain
 470select key, count(1) from clustergroupby  where ds='101'  group by key,3 limit 10
 471PREHOOK: type: QUERY
 472POSTHOOK: query: --constant--
 473explain
 474select key, count(1) from clustergroupby  where ds='101'  group by key,3 limit 10
 475POSTHOOK: type: QUERY
 476POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 477POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 478POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 479POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 480ABSTRACT SYNTAX TREE:
 481  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME clustergroupby))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL key)) (TOK_SELEXPR (TOK_FUNCTION count 1))) (TOK_WHERE (= (TOK_TABLE_OR_COL ds) '101')) (TOK_GROUPBY (TOK_TABLE_OR_COL key) 3) (TOK_LIMIT 10)))
 482
 483STAGE DEPENDENCIES:
 484  Stage-1 is a root stage
 485  Stage-0 is a root stage
 486
 487STAGE PLANS:
 488  Stage: Stage-1
 489    Map Reduce
 490      Alias -> Map Operator Tree:
 491        clustergroupby 
 492          TableScan
 493            alias: clustergroupby
 494            Filter Operator
 495              predicate:
 496                  expr: (ds = '101')
 497                  type: boolean
 498              Select Operator
 499                expressions:
 500                      expr: key
 501                      type: string
 502                outputColumnNames: key
 503                Group By Operator
 504                  aggregations:
 505                        expr: count(1)
 506                  bucketGroup: true
 507                  keys:
 508                        expr: key
 509                        type: string
 510                        expr: 3
 511                        type: int
 512                  mode: hash
 513                  outputColumnNames: _col0, _col1, _col2
 514                  Reduce Output Operator
 515                    key expressions:
 516                          expr: _col0
 517                          type: string
 518                          expr: _col1
 519                          type: int
 520                    sort order: ++
 521                    Map-reduce partition columns:
 522                          expr: _col0
 523                          type: string
 524                          expr: _col1
 525                          type: int
 526                    tag: -1
 527                    value expressions:
 528                          expr: _col2
 529                          type: bigint
 530      Reduce Operator Tree:
 531        Group By Operator
 532          aggregations:
 533                expr: count(VALUE._col0)
 534          bucketGroup: false
 535          keys:
 536                expr: KEY._col0
 537                type: string
 538                expr: KEY._col1
 539                type: int
 540          mode: mergepartial
 541          outputColumnNames: _col0, _col1, _col2
 542          Select Operator
 543            expressions:
 544                  expr: _col0
 545                  type: string
 546                  expr: _col2
 547                  type: bigint
 548            outputColumnNames: _col0, _col1
 549            Limit
 550              File Output Operator
 551                compressed: false
 552                GlobalTableId: 0
 553                table:
 554                    input format: org.apache.hadoop.mapred.TextInputFormat
 555                    output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
 556
 557  Stage: Stage-0
 558    Fetch Operator
 559      limit: 10
 560
 561
 562PREHOOK: query: select key, count(1) from clustergroupby  where ds='101' group by key,3 limit 10
 563PREHOOK: type: QUERY
 564PREHOOK: Input: default@clustergroupby@ds=101
 565PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-31-29_764_2397216315877695624/-mr-10000
 566POSTHOOK: query: select key, count(1) from clustergroupby  where ds='101' group by key,3 limit 10
 567POSTHOOK: type: QUERY
 568POSTHOOK: Input: default@clustergroupby@ds=101
 569POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-31-29_764_2397216315877695624/-mr-10000
 570POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 571POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 572POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 573POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 5740	3
 57510	1
 576100	2
 577103	2
 578104	2
 579105	1
 58011	1
 581111	1
 582113	2
 583114	1
 584PREHOOK: query: --subquery--
 585explain
 586select key, count(1) from (select value as key, key as value from clustergroupby where ds='101')subq group by key limit 10
 587PREHOOK: type: QUERY
 588POSTHOOK: query: --subquery--
 589explain
 590select key, count(1) from (select value as key, key as value from clustergroupby where ds='101')subq group by key limit 10
 591POSTHOOK: type: QUERY
 592POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 593POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 594POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 595POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 596ABSTRACT SYNTAX TREE:
 597  (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME clustergroupby))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL value) key) (TOK_SELEXPR (TOK_TABLE_OR_COL key) value)) (TOK_WHERE (= (TOK_TABLE_OR_COL ds) '101')))) subq)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL key)) (TOK_SELEXPR (TOK_FUNCTION count 1))) (TOK_GROUPBY (TOK_TABLE_OR_COL key)) (TOK_LIMIT 10)))
 598
 599STAGE DEPENDENCIES:
 600  Stage-1 is a root stage
 601  Stage-0 is a root stage
 602
 603STAGE PLANS:
 604  Stage: Stage-1
 605    Map Reduce
 606      Alias -> Map Operator Tree:
 607        subq:clustergroupby 
 608          TableScan
 609            alias: clustergroupby
 610            Filter Operator
 611              predicate:
 612                  expr: (ds = '101')
 613                  type: boolean
 614              Select Operator
 615                expressions:
 616                      expr: value
 617                      type: string
 618                outputColumnNames: _col0
 619                Select Operator
 620                  expressions:
 621                        expr: _col0
 622                        type: string
 623                  outputColumnNames: _col0
 624                  Group By Operator
 625                    aggregations:
 626                          expr: count(1)
 627                    bucketGroup: false
 628                    keys:
 629                          expr: _col0
 630                          type: string
 631                    mode: hash
 632                    outputColumnNames: _col0, _col1
 633                    Reduce Output Operator
 634                      key expressions:
 635                            expr: _col0
 636                            type: string
 637                      sort order: +
 638                      Map-reduce partition columns:
 639                            expr: _col0
 640                            type: string
 641                      tag: -1
 642                      value expressions:
 643                            expr: _col1
 644                            type: bigint
 645      Reduce Operator Tree:
 646        Group By Operator
 647          aggregations:
 648                expr: count(VALUE._col0)
 649          bucketGroup: false
 650          keys:
 651                expr: KEY._col0
 652                type: string
 653          mode: mergepartial
 654          outputColumnNames: _col0, _col1
 655          Select Operator
 656            expressions:
 657                  expr: _col0
 658                  type: string
 659                  expr: _col1
 660                  type: bigint
 661            outputColumnNames: _col0, _col1
 662            Limit
 663              File Output Operator
 664                compressed: false
 665                GlobalTableId: 0
 666                table:
 667                    input format: org.apache.hadoop.mapred.TextInputFormat
 668                    output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
 669
 670  Stage: Stage-0
 671    Fetch Operator
 672      limit: 10
 673
 674
 675PREHOOK: query: select key, count(1) from (select value as key, key as value from clustergroupby where ds='101')subq group by key limit 10
 676PREHOOK: type: QUERY
 677PREHOOK: Input: default@clustergroupby@ds=101
 678PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-31-33_487_1431386357774433664/-mr-10000
 679POSTHOOK: query: select key, count(1) from (select value as key, key as value from clustergroupby where ds='101')subq group by key limit 10
 680POSTHOOK: type: QUERY
 681POSTHOOK: Input: default@clustergroupby@ds=101
 682POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-31-33_487_1431386357774433664/-mr-10000
 683POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 684POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 685POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 686POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 687val_0	3
 688val_10	1
 689val_100	2
 690val_103	2
 691val_104	2
 692val_105	1
 693val_11	1
 694val_111	1
 695val_113	2
 696val_114	1
 697PREHOOK: query: explain
 698select key, count(1) from clustergroupby  group by key
 699PREHOOK: type: QUERY
 700POSTHOOK: query: explain
 701select key, count(1) from clustergroupby  group by key
 702POSTHOOK: type: QUERY
 703POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 704POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 705POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 706POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 707ABSTRACT SYNTAX TREE:
 708  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME clustergroupby))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL key)) (TOK_SELEXPR (TOK_FUNCTION count 1))) (TOK_GROUPBY (TOK_TABLE_OR_COL key))))
 709
 710STAGE DEPENDENCIES:
 711  Stage-1 is a root stage
 712  Stage-0 is a root stage
 713
 714STAGE PLANS:
 715  Stage: Stage-1
 716    Map Reduce
 717      Alias -> Map Operator Tree:
 718        clustergroupby 
 719          TableScan
 720            alias: clustergroupby
 721            Select Operator
 722              expressions:
 723                    expr: key
 724                    type: string
 725              outputColumnNames: key
 726              Group By Operator
 727                aggregations:
 728                      expr: count(1)
 729                bucketGroup: false
 730                keys:
 731                      expr: key
 732                      type: string
 733                mode: hash
 734                outputColumnNames: _col0, _col1
 735                Reduce Output Operator
 736                  key expressions:
 737                        expr: _col0
 738                        type: string
 739                  sort order: +
 740                  Map-reduce partition columns:
 741                        expr: _col0
 742                        type: string
 743                  tag: -1
 744                  value expressions:
 745                        expr: _col1
 746                        type: bigint
 747      Reduce Operator Tree:
 748        Group By Operator
 749          aggregations:
 750                expr: count(VALUE._col0)
 751          bucketGroup: false
 752          keys:
 753                expr: KEY._col0
 754                type: string
 755          mode: mergepartial
 756          outputColumnNames: _col0, _col1
 757          Select Operator
 758            expressions:
 759                  expr: _col0
 760                  type: string
 761                  expr: _col1
 762                  type: bigint
 763            outputColumnNames: _col0, _col1
 764            File Output Operator
 765              compressed: false
 766              GlobalTableId: 0
 767              table:
 768                  input format: org.apache.hadoop.mapred.TextInputFormat
 769                  output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
 770
 771  Stage: Stage-0
 772    Fetch Operator
 773      limit: -1
 774
 775
 776PREHOOK: query: select key, count(1) from clustergroupby  group by key
 777PREHOOK: type: QUERY
 778PREHOOK: Input: default@clustergroupby@ds=100
 779PREHOOK: Input: default@clustergroupby@ds=101
 780PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-31-37_126_6695656183965608913/-mr-10000
 781POSTHOOK: query: select key, count(1) from clustergroupby  group by key
 782POSTHOOK: type: QUERY
 783POSTHOOK: Input: default@clustergroupby@ds=100
 784POSTHOOK: Input: default@clustergroupby@ds=101
 785POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-31-37_126_6695656183965608913/-mr-10000
 786POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 787POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 788POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 789POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 7900	6
 79110	2
 792100	4
 793103	4
 794104	4
 795105	2
 79611	2
 797111	2
 798113	4
 799114	2
 800116	2
 801118	4
 802119	6
 80312	4
 804120	4
 805125	4
 806126	2
 807128	6
 808129	4
 809131	2
 810133	2
 811134	4
 812136	2
 813137	4
 814138	8
 815143	2
 816145	2
 817146	4
 818149	4
 81915	4
 820150	2
 821152	4
 822153	2
 823155	2
 824156	2
 825157	2
 826158	2
 827160	2
 828162	2
 829163	2
 830164	4
 831165	4
 832166	2
 833167	6
 834168	2
 835169	8
 83617	2
 837170	2
 838172	4
 839174	4
 840175	4
 841176	4
 842177	2
 843178	2
 844179	4
 84518	4
 846180	2
 847181	2
 848183	2
 849186	2
 850187	6
 851189	2
 85219	2
 853190	2
 854191	4
 855192	2
 856193	6
 857194	2
 858195	4
 859196	2
 860197	4
 861199	6
 8622	2
 86320	2
 864200	4
 865201	2
 866202	2
 867203	4
 868205	4
 869207	4
 870208	6
 871209	4
 872213	4
 873214	2
 874216	4
 875217	4
 876218	2
 877219	4
 878221	4
 879222	2
 880223	4
 881224	4
 882226	2
 883228	2
 884229	4
 885230	10
 886233	4
 887235	2
 888237	4
 889238	4
 890239	4
 89124	4
 892241	2
 893242	4
 894244	2
 895247	2
 896248	2
 897249	2
 898252	2
 899255	4
 900256	4
 901257	2
 902258	2
 90326	4
 904260	2
 905262	2
 906263	2
 907265	4
 908266	2
 90927	2
 910272	4
 911273	6
 912274	2
 913275	2
 914277	8
 915278	4
 91628	2
 917280	4
 918281	4
 919282	4
 920283	2
 921284	2
 922285	2
 923286	2
 924287	2
 925288	4
 926289	2
 927291	2
 928292	2
 929296	2
 930298	6
 93130	2
 932302	2
 933305	2
 934306	2
 935307	4
 936308	2
 937309	4
 938310	2
 939311	6
 940315	2
 941316	6
 942317	4
 943318	6
 944321	4
 945322	4
 946323	2
 947325	4
 948327	6
 94933	2
 950331	4
 951332	2
 952333	4
 953335	2
 954336	2
 955338	2
 956339	2
 95734	2
 958341	2
 959342	4
 960344	4
 961345	2
 962348	10
 96335	6
 964351	2
 965353	4
 966356	2
 967360	2
 968362	2
 969364	2
 970365	2
 971366	2
 972367	4
 973368	2
 974369	6
 97537	4
 976373	2
 977374	2
 978375	2
 979377	2
 980378	2
 981379	2
 982382	4
 983384	6
 984386	2
 985389	2
 986392	2
 987393	2
 988394	2
 989395	4
 990396	6
 991397	4
 992399	4
 9934	2
 994400	2
 995401	10
 996402	2
 997403	6
 998404	4
 999406	8
1000407	2
1001409	6
100241	2
1003411	2
1004413	4
1005414	4
1006417	6
1007418	2
1008419	2
100942	4
1010421	2
1011424	4
1012427	2
1013429	4
101443	2
1015430	6
1016431	6
1017432	2
1018435	2
1019436	2
1020437	2
1021438	6
1022439	4
102344	2
1024443	2
1025444	2
1026446	2
1027448	2
1028449	2
1029452	2
1030453	2
1031454	6
1032455	2
1033457	2
1034458	4
1035459	4
1036460	2
1037462	4
1038463	4
1039466	6
1040467	2
1041468	8
1042469	10
104347	2
1044470	2
1045472	2
1046475	2
1047477	2
1048478	4
1049479	2
1050480	6
1051481	2
1052482	2
1053483	2
1054484	2
1055485	2
1056487	2
1057489	8
1058490	2
1059491	2
1060492	4
1061493	2
1062494	2
1063495	2
1064496	2
1065497	2
1066498	6
10675	6
106851	4
106953	2
107054	2
107157	2
107258	4
107364	2
107465	2
107566	2
107667	4
107769	2
107870	6
107972	4
108074	2
108176	4
108277	2
108378	2
10848	2
108580	2
108682	2
108783	4
108884	4
108985	2
109086	2
109187	2
10929	2
109390	6
109492	2
109595	4
109696	2
109797	4
109898	4
1099PREHOOK: query: explain
1100select key, count(1) from clustergroupby  group by key, 3
1101PREHOOK: type: QUERY
1102POSTHOOK: query: explain
1103select key, count(1) from clustergroupby  group by key, 3
1104POSTHOOK: type: QUERY
1105POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1106POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1107POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1108POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1109ABSTRACT SYNTAX TREE:
1110  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME clustergroupby))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL key)) (TOK_SELEXPR (TOK_FUNCTION count 1))) (TOK_GROUPBY (TOK_TABLE_OR_COL key) 3)))
1111
1112STAGE DEPENDENCIES:
1113  Stage-1 is a root stage
1114  Stage-0 is a root stage
1115
1116STAGE PLANS:
1117  Stage: Stage-1
1118    Map Reduce
1119      Alias -> Map Operator Tree:
1120        clustergroupby 
1121          TableScan
1122            alias: clustergroupby
1123            Select Operator
1124              expressions:
1125                    expr: key
1126                    type: string
1127              outputColumnNames: key
1128              Group By Operator
1129                aggregations:
1130                      expr: count(1)
1131                bucketGroup: false
1132                keys:
1133                      expr: key
1134                      type: string
1135                      expr: 3
1136                      type: int
1137                mode: hash
1138                outputColumnNames: _col0, _col1, _col2
1139                Reduce Output Operator
1140                  key expressions:
1141                        expr: _col0
1142                        type: string
1143                        expr: _col1
1144                        type: int
1145                  sort order: ++
1146                  Map-reduce partition columns:
1147                        expr: _col0
1148                        type: string
1149                        expr: _col1
1150                        type: int
1151                  tag: -1
1152                  value expressions:
1153                        expr: _col2
1154                        type: bigint
1155      Reduce Operator Tree:
1156        Group By Operator
1157          aggregations:
1158                expr: count(VALUE._col0)
1159          bucketGroup: false
1160          keys:
1161                expr: KEY._col0
1162                type: string
1163                expr: KEY._col1
1164                type: int
1165          mode: mergepartial
1166          outputColumnNames: _col0, _col1, _col2
1167          Select Operator
1168            expressions:
1169                  expr: _col0
1170                  type: string
1171                  expr: _col2
1172                  type: bigint
1173            outputColumnNames: _col0, _col1
1174            File Output Operator
1175              compressed: false
1176              GlobalTableId: 0
1177              table:
1178                  input format: org.apache.hadoop.mapred.TextInputFormat
1179                  output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
1180
1181  Stage: Stage-0
1182    Fetch Operator
1183      limit: -1
1184
1185
1186PREHOOK: query: --sort columns--
1187alter table clustergroupby clustered by (value) sorted by (key, value) into 1 buckets
1188PREHOOK: type: ALTERTABLE_CLUSTER_SORT
1189PREHOOK: Input: default@clustergroupby
1190PREHOOK: Output: default@clustergroupby
1191POSTHOOK: query: --sort columns--
1192alter table clustergroupby clustered by (value) sorted by (key, value) into 1 buckets
1193POSTHOOK: type: ALTERTABLE_CLUSTER_SORT
1194POSTHOOK: Input: default@clustergroupby
1195POSTHOOK: Output: default@clustergroupby
1196POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1197POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1198POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1199POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1200PREHOOK: query: describe extended clustergroupby
1201PREHOOK: type: DESCTABLE
1202POSTHOOK: query: describe extended clustergroupby
1203POSTHOOK: type: DESCTABLE
1204POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1205POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1206POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1207POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1208key	string	
1209value	string	
1210ds	string	
1211	 	 
1212Detailed Table Information	Table(tableName:clustergroupby, dbName:default, owner:sdong, createTime:1297330264, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null), FieldSchema(name:value, type:string, comment:null), FieldSchema(name:ds, type:string, comment:null)], location:pfile:/data/users/sdong/www/open-source-hive1/build/ql/test/data/warehouse/clustergroupby, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[value], sortCols:[Order(col:key, order:1), Order(col:value, order:1)], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null)], parameters:{numPartitions=2, numFiles=2, last_modified_by=sdong, last_modified_time=1297330300, transient_lastDdlTime=1297330300, numRows=1000, totalSize=11624}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE)	
1213PREHOOK: query: insert overwrite table clustergroupby partition (ds='102') select key, value from src distribute by value sort by key, value
1214PREHOOK: type: QUERY
1215PREHOOK: Input: default@src
1216PREHOOK: Output: default@clustergroupby@ds=102
1217POSTHOOK: query: insert overwrite table clustergroupby partition (ds='102') select key, value from src distribute by value sort by key, value
1218POSTHOOK: type: QUERY
1219POSTHOOK: Input: default@src
1220POSTHOOK: Output: default@clustergroupby@ds=102
1221POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1222POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1223POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1224POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1225POSTHOOK: Lineage: clustergroupby PARTITION(ds=102).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1226POSTHOOK: Lineage: clustergroupby PARTITION(ds=102).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1227PREHOOK: query: explain
1228select key, count(1) from clustergroupby  where ds='102'  group by key limit 10
1229PREHOOK: type: QUERY
1230POSTHOOK: query: explain
1231select key, count(1) from clustergroupby  where ds='102'  group by key limit 10
1232POSTHOOK: type: QUERY
1233POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1234POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1235POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1236POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1237POSTHOOK: Lineage: clustergroupby PARTITION(ds=102).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1238POSTHOOK: Lineage: clustergroupby PARTITION(ds=102).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1239ABSTRACT SYNTAX TREE:
1240  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME clustergroupby))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL key)) (TOK_SELEXPR (TOK_FUNCTION count 1))) (TOK_WHERE (= (TOK_TABLE_OR_COL ds) '102')) (TOK_GROUPBY (TOK_TABLE_OR_COL key)) (TOK_LIMIT 10)))
1241
1242STAGE DEPENDENCIES:
1243  Stage-1 is a root stage
1244  Stage-0 is a root stage
1245
1246STAGE PLANS:
1247  Stage: Stage-1
1248    Map Reduce
1249      Alias -> Map Operator Tree:
1250        clustergroupby 
1251          TableScan
1252            alias: clustergroupby
1253            Filter Operator
1254              predicate:
1255                  expr: (ds = '102')
1256                  type: boolean
1257              Select Operator
1258                expressions:
1259                      expr: key
1260                      type: string
1261                outputColumnNames: key
1262                Group By Operator
1263                  aggregations:
1264                        expr: count(1)
1265                  bucketGroup: true
1266                  keys:
1267                        expr: key
1268                        type: string
1269                  mode: hash
1270                  outputColumnNames: _col0, _col1
1271                  Reduce Output Operator
1272                    key expressions:
1273                          expr: _col0
1274                          type: string
1275                    sort order: +
1276                    Map-reduce partition columns:
1277                          expr: _col0
1278                          type: string
1279                    tag: -1
1280                    value expressions:
1281                          expr: _col1
1282                          type: bigint
1283      Reduce Operator Tree:
1284        Group By Operator
1285          aggregations:
1286                expr: count(VALUE._col0)
1287          bucketGroup: false
1288          keys:
1289                expr: KEY._col0
1290                type: string
1291          mode: mergepartial
1292          outputColumnNames: _col0, _col1
1293          Select Operator
1294            expressions:
1295                  expr: _col0
1296                  type: string
1297                  expr: _col1
1298                  type: bigint
1299            outputColumnNames: _col0, _col1
1300            Limit
1301              File Output Operator
1302                compressed: false
1303                GlobalTableId: 0
1304                table:
1305                    input format: org.apache.hadoop.mapred.TextInputFormat
1306                    output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
1307
1308  Stage: Stage-0
1309    Fetch Operator
1310      limit: 10
1311
1312
1313PREHOOK: query: select key, count(1) from clustergroupby  where ds='102' group by key limit 10
1314PREHOOK: type: QUERY
1315PREHOOK: Input: default@clustergroupby@ds=102
1316PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-31-45_956_2691533777800757183/-mr-10000
1317POSTHOOK: query: select key, count(1) from clustergroupby  where ds='102' group by key limit 10
1318POSTHOOK: type: QUERY
1319POSTHOOK: Input: default@clustergroupby@ds=102
1320POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-31-45_956_2691533777800757183/-mr-10000
1321POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1322POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1323POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1324POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1325POSTHOOK: Lineage: clustergroupby PARTITION(ds=102).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1326POSTHOOK: Lineage: clustergroupby PARTITION(…

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