PageRenderTime 5473ms CodeModel.GetById 5443ms app.highlight 19ms RepoModel.GetById 3ms app.codeStats 1ms

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

#
text | 1849 lines | 1780 code | 69 blank | 0 comment | 0 complexity | 03ae5c4b271adb9683bda8460a989aca MD5 | raw file
   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(ds=102).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
13270	3
132810	1
1329100	2
1330103	2
1331104	2
1332105	1
133311	1
1334111	1
1335113	2
1336114	1
1337PREHOOK: query: explain
1338select value, count(1) from clustergroupby  where ds='102'  group by value limit 10
1339PREHOOK: type: QUERY
1340POSTHOOK: query: explain
1341select value, count(1) from clustergroupby  where ds='102'  group by value limit 10
1342POSTHOOK: type: QUERY
1343POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1344POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1345POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1346POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1347POSTHOOK: Lineage: clustergroupby PARTITION(ds=102).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1348POSTHOOK: Lineage: clustergroupby PARTITION(ds=102).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1349ABSTRACT SYNTAX TREE:
1350  (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)) (TOK_SELEXPR (TOK_FUNCTION count 1))) (TOK_WHERE (= (TOK_TABLE_OR_COL ds) '102')) (TOK_GROUPBY (TOK_TABLE_OR_COL value)) (TOK_LIMIT 10)))
1351
1352STAGE DEPENDENCIES:
1353  Stage-1 is a root stage
1354  Stage-0 is a root stage
1355
1356STAGE PLANS:
1357  Stage: Stage-1
1358    Map Reduce
1359      Alias -> Map Operator Tree:
1360        clustergroupby 
1361          TableScan
1362            alias: clustergroupby
1363            Filter Operator
1364              predicate:
1365                  expr: (ds = '102')
1366                  type: boolean
1367              Select Operator
1368                expressions:
1369                      expr: value
1370                      type: string
1371                outputColumnNames: value
1372                Group By Operator
1373                  aggregations:
1374                        expr: count(1)
1375                  bucketGroup: false
1376                  keys:
1377                        expr: value
1378                        type: string
1379                  mode: hash
1380                  outputColumnNames: _col0, _col1
1381                  Reduce Output Operator
1382                    key expressions:
1383                          expr: _col0
1384                          type: string
1385                    sort order: +
1386                    Map-reduce partition columns:
1387                          expr: _col0
1388                          type: string
1389                    tag: -1
1390                    value expressions:
1391                          expr: _col1
1392                          type: bigint
1393      Reduce Operator Tree:
1394        Group By Operator
1395          aggregations:
1396                expr: count(VALUE._col0)
1397          bucketGroup: false
1398          keys:
1399                expr: KEY._col0
1400                type: string
1401          mode: mergepartial
1402          outputColumnNames: _col0, _col1
1403          Select Operator
1404            expressions:
1405                  expr: _col0
1406                  type: string
1407                  expr: _col1
1408                  type: bigint
1409            outputColumnNames: _col0, _col1
1410            Limit
1411              File Output Operator
1412                compressed: false
1413                GlobalTableId: 0
1414                table:
1415                    input format: org.apache.hadoop.mapred.TextInputFormat
1416                    output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
1417
1418  Stage: Stage-0
1419    Fetch Operator
1420      limit: 10
1421
1422
1423PREHOOK: query: select value, count(1) from clustergroupby  where ds='102'  group by value limit 10
1424PREHOOK: type: QUERY
1425PREHOOK: Input: default@clustergroupby@ds=102
1426PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-31-49_553_601799080303065238/-mr-10000
1427POSTHOOK: query: select value, count(1) from clustergroupby  where ds='102'  group by value limit 10
1428POSTHOOK: type: QUERY
1429POSTHOOK: Input: default@clustergroupby@ds=102
1430POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-31-49_553_601799080303065238/-mr-10000
1431POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1432POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1433POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1434POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1435POSTHOOK: Lineage: clustergroupby PARTITION(ds=102).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1436POSTHOOK: Lineage: clustergroupby PARTITION(ds=102).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1437val_0	3
1438val_10	1
1439val_100	2
1440val_103	2
1441val_104	2
1442val_105	1
1443val_11	1
1444val_111	1
1445val_113	2
1446val_114	1
1447PREHOOK: query: explain
1448select key, count(1) from clustergroupby  where ds='102'  group by key, value limit 10
1449PREHOOK: type: QUERY
1450POSTHOOK: query: explain
1451select key, count(1) from clustergroupby  where ds='102'  group by key, value limit 10
1452POSTHOOK: type: QUERY
1453POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1454POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1455POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1456POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1457POSTHOOK: Lineage: clustergroupby PARTITION(ds=102).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1458POSTHOOK: Lineage: clustergroupby PARTITION(ds=102).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1459ABSTRACT SYNTAX TREE:
1460  (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_TABLE_OR_COL value)) (TOK_LIMIT 10)))
1461
1462STAGE DEPENDENCIES:
1463  Stage-1 is a root stage
1464  Stage-0 is a root stage
1465
1466STAGE PLANS:
1467  Stage: Stage-1
1468    Map Reduce
1469      Alias -> Map Operator Tree:
1470        clustergroupby 
1471          TableScan
1472            alias: clustergroupby
1473            Filter Operator
1474              predicate:
1475                  expr: (ds = '102')
1476                  type: boolean
1477              Select Operator
1478                expressions:
1479                      expr: key
1480                      type: string
1481                      expr: value
1482                      type: string
1483                outputColumnNames: key, value
1484                Group By Operator
1485                  aggregations:
1486                        expr: count(1)
1487                  bucketGroup: true
1488                  keys:
1489                        expr: key
1490                        type: string
1491                        expr: value
1492                        type: string
1493                  mode: hash
1494                  outputColumnNames: _col0, _col1, _col2
1495                  Reduce Output Operator
1496                    key expressions:
1497                          expr: _col0
1498                          type: string
1499                          expr: _col1
1500                          type: string
1501                    sort order: ++
1502                    Map-reduce partition columns:
1503                          expr: _col0
1504                          type: string
1505                          expr: _col1
1506                          type: string
1507                    tag: -1
1508                    value expressions:
1509                          expr: _col2
1510                          type: bigint
1511      Reduce Operator Tree:
1512        Group By Operator
1513          aggregations:
1514                expr: count(VALUE._col0)
1515          bucketGroup: false
1516          keys:
1517                expr: KEY._col0
1518                type: string
1519                expr: KEY._col1
1520                type: string
1521          mode: mergepartial
1522          outputColumnNames: _col0, _col1, _col2
1523          Select Operator
1524            expressions:
1525                  expr: _col0
1526                  type: string
1527                  expr: _col2
1528                  type: bigint
1529            outputColumnNames: _col0, _col1
1530            Limit
1531              File Output Operator
1532                compressed: false
1533                GlobalTableId: 0
1534                table:
1535                    input format: org.apache.hadoop.mapred.TextInputFormat
1536                    output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
1537
1538  Stage: Stage-0
1539    Fetch Operator
1540      limit: 10
1541
1542
1543PREHOOK: query: select key, count(1) from clustergroupby  where ds='102'  group by key, value limit 10
1544PREHOOK: type: QUERY
1545PREHOOK: Input: default@clustergroupby@ds=102
1546PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-31-53_197_8563057494828766352/-mr-10000
1547POSTHOOK: query: select key, count(1) from clustergroupby  where ds='102'  group by key, value limit 10
1548POSTHOOK: type: QUERY
1549POSTHOOK: Input: default@clustergroupby@ds=102
1550POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-31-53_197_8563057494828766352/-mr-10000
1551POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1552POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1553POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1554POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1555POSTHOOK: Lineage: clustergroupby PARTITION(ds=102).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1556POSTHOOK: Lineage: clustergroupby PARTITION(ds=102).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
15570	3
155810	1
1559100	2
1560103	2
1561104	2
1562105	1
156311	1
1564111	1
1565113	2
1566114	1
1567PREHOOK: query: alter table clustergroupby clustered by (value, key) sorted by (key) into 1 buckets
1568PREHOOK: type: ALTERTABLE_CLUSTER_SORT
1569PREHOOK: Input: default@clustergroupby
1570PREHOOK: Output: default@clustergroupby
1571POSTHOOK: query: alter table clustergroupby clustered by (value, key) sorted by (key) into 1 buckets
1572POSTHOOK: type: ALTERTABLE_CLUSTER_SORT
1573POSTHOOK: Input: default@clustergroupby
1574POSTHOOK: Output: default@clustergroupby
1575POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1576POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1577POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1578POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1579POSTHOOK: Lineage: clustergroupby PARTITION(ds=102).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1580POSTHOOK: Lineage: clustergroupby PARTITION(ds=102).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1581PREHOOK: query: describe extended clustergroupby
1582PREHOOK: type: DESCTABLE
1583POSTHOOK: query: describe extended clustergroupby
1584POSTHOOK: type: DESCTABLE
1585POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1586POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1587POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1588POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1589POSTHOOK: Lineage: clustergroupby PARTITION(ds=102).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1590POSTHOOK: Lineage: clustergroupby PARTITION(ds=102).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1591key	string	
1592value	string	
1593ds	string	
1594	 	 
1595Detailed 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, key], sortCols:[Order(col:key, order:1)], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null)], parameters:{numPartitions=3, numFiles=3, last_modified_by=sdong, last_modified_time=1297330316, transient_lastDdlTime=1297330316, numRows=1500, totalSize=17436}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE)	
1596PREHOOK: query: insert overwrite table clustergroupby partition (ds='103') select key, value from src distribute by value, key sort by key
1597PREHOOK: type: QUERY
1598PREHOOK: Input: default@src
1599PREHOOK: Output: default@clustergroupby@ds=103
1600POSTHOOK: query: insert overwrite table clustergroupby partition (ds='103') select key, value from src distribute by value, key sort by key
1601POSTHOOK: type: QUERY
1602POSTHOOK: Input: default@src
1603POSTHOOK: Output: default@clustergroupby@ds=103
1604POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1605POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1606POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1607POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1608POSTHOOK: Lineage: clustergroupby PARTITION(ds=102).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1609POSTHOOK: Lineage: clustergroupby PARTITION(ds=102).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1610POSTHOOK: Lineage: clustergroupby PARTITION(ds=103).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1611POSTHOOK: Lineage: clustergroupby PARTITION(ds=103).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1612PREHOOK: query: explain
1613select key, count(1) from clustergroupby  where ds='103'  group by key limit 10
1614PREHOOK: type: QUERY
1615POSTHOOK: query: explain
1616select key, count(1) from clustergroupby  where ds='103'  group by key limit 10
1617POSTHOOK: type: QUERY
1618POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1619POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1620POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1621POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1622POSTHOOK: Lineage: clustergroupby PARTITION(ds=102).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1623POSTHOOK: Lineage: clustergroupby PARTITION(ds=102).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1624POSTHOOK: Lineage: clustergroupby PARTITION(ds=103).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1625POSTHOOK: Lineage: clustergroupby PARTITION(ds=103).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1626ABSTRACT SYNTAX TREE:
1627  (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) '103')) (TOK_GROUPBY (TOK_TABLE_OR_COL key)) (TOK_LIMIT 10)))
1628
1629STAGE DEPENDENCIES:
1630  Stage-1 is a root stage
1631  Stage-0 is a root stage
1632
1633STAGE PLANS:
1634  Stage: Stage-1
1635    Map Reduce
1636      Alias -> Map Operator Tree:
1637        clustergroupby 
1638          TableScan
1639            alias: clustergroupby
1640            Filter Operator
1641              predicate:
1642                  expr: (ds = '103')
1643                  type: boolean
1644              Select Operator
1645                expressions:
1646                      expr: key
1647                      type: string
1648                outputColumnNames: key
1649                Group By Operator
1650                  aggregations:
1651                        expr: count(1)
1652                  bucketGroup: true
1653                  keys:
1654                        expr: key
1655                        type: string
1656                  mode: hash
1657                  outputColumnNames: _col0, _col1
1658                  Reduce Output Operator
1659                    key expressions:
1660                          expr: _col0
1661                          type: string
1662                    sort order: +
1663                    Map-reduce partition columns:
1664                          expr: _col0
1665                          type: string
1666                    tag: -1
1667                    value expressions:
1668                          expr: _col1
1669                          type: bigint
1670      Reduce Operator Tree:
1671        Group By Operator
1672          aggregations:
1673                expr: count(VALUE._col0)
1674          bucketGroup: false
1675          keys:
1676                expr: KEY._col0
1677                type: string
1678          mode: mergepartial
1679          outputColumnNames: _col0, _col1
1680          Select Operator
1681            expressions:
1682                  expr: _col0
1683                  type: string
1684                  expr: _col1
1685                  type: bigint
1686            outputColumnNames: _col0, _col1
1687            Limit
1688              File Output Operator
1689                compressed: false
1690                GlobalTableId: 0
1691                table:
1692                    input format: org.apache.hadoop.mapred.TextInputFormat
1693                    output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
1694
1695  Stage: Stage-0
1696    Fetch Operator
1697      limit: 10
1698
1699
1700PREHOOK: query: select key, count(1) from clustergroupby  where ds='103' group by key limit 10
1701PREHOOK: type: QUERY
1702PREHOOK: Input: default@clustergroupby@ds=103
1703PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-32-01_981_7801389614651227175/-mr-10000
1704POSTHOOK: query: select key, count(1) from clustergroupby  where ds='103' group by key limit 10
1705POSTHOOK: type: QUERY
1706POSTHOOK: Input: default@clustergroupby@ds=103
1707POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-32-01_981_7801389614651227175/-mr-10000
1708POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1709POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1710POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1711POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1712POSTHOOK: Lineage: clustergroupby PARTITION(ds=102).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1713POSTHOOK: Lineage: clustergroupby PARTITION(ds=102).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1714POSTHOOK: Lineage: clustergroupby PARTITION(ds=103).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1715POSTHOOK: Lineage: clustergroupby PARTITION(ds=103).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
17160	3
171710	1
1718100	2
1719103	2
1720104	2
1721105	1
172211	1
1723111	1
1724113	2
1725114	1
1726PREHOOK: query: explain
1727select key, count(1) from clustergroupby  where ds='103'  group by value, key limit 10
1728PREHOOK: type: QUERY
1729POSTHOOK: query: explain
1730select key, count(1) from clustergroupby  where ds='103'  group by value, key limit 10
1731POSTHOOK: type: QUERY
1732POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1733POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1734POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1735POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1736POSTHOOK: Lineage: clustergroupby PARTITION(ds=102).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1737POSTHOOK: Lineage: clustergroupby PARTITION(ds=102).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1738POSTHOOK: Lineage: clustergroupby PARTITION(ds=103).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1739POSTHOOK: Lineage: clustergroupby PARTITION(ds=103).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1740ABSTRACT SYNTAX TREE:
1741  (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) '103')) (TOK_GROUPBY (TOK_TABLE_OR_COL value) (TOK_TABLE_OR_COL key)) (TOK_LIMIT 10)))
1742
1743STAGE DEPENDENCIES:
1744  Stage-1 is a root stage
1745  Stage-0 is a root stage
1746
1747STAGE PLANS:
1748  Stage: Stage-1
1749    Map Reduce
1750      Alias -> Map Operator Tree:
1751        clustergroupby 
1752          TableScan
1753            alias: clustergroupby
1754            Filter Operator
1755              predicate:
1756                  expr: (ds = '103')
1757                  type: boolean
1758              Select Operator
1759                expressions:
1760                      expr: value
1761                      type: string
1762                      expr: key
1763                      type: string
1764                outputColumnNames: value, key
1765                Group By Operator
1766                  aggregations:
1767                        expr: count(1)
1768                  bucketGroup: false
1769                  keys:
1770                        expr: value
1771                        type: string
1772                        expr: key
1773                        type: string
1774                  mode: hash
1775                  outputColumnNames: _col0, _col1, _col2
1776                  Reduce Output Operator
1777                    key expressions:
1778                          expr: _col0
1779                          type: string
1780                          expr: _col1
1781                          type: string
1782                    sort order: ++
1783                    Map-reduce partition columns:
1784                          expr: _col0
1785                          type: string
1786                          expr: _col1
1787                          type: string
1788                    tag: -1
1789                    value expressions:
1790                          expr: _col2
1791                          type: bigint
1792      Reduce Operator Tree:
1793        Group By Operator
1794          aggregations:
1795                expr: count(VALUE._col0)
1796          bucketGroup: false
1797          keys:
1798                expr: KEY._col0
1799                type: string
1800                expr: KEY._col1
1801                type: string
1802          mode: mergepartial
1803          outputColumnNames: _col0, _col1, _col2
1804          Select Operator
1805            expressions:
1806                  expr: _col1
1807                  type: string
1808                  expr: _col2
1809                  type: bigint
1810            outputColumnNames: _col0, _col1
1811            Limit
1812              File Output Operator
1813                compressed: false
1814                GlobalTableId: 0
1815                table:
1816                    input format: org.apache.hadoop.mapred.TextInputFormat
1817                    output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
1818
1819  Stage: Stage-0
1820    Fetch Operator
1821      limit: 10
1822
1823
1824PREHOOK: query: select key, count(1) from clustergroupby  where ds='103' group by  value, key limit 10
1825PREHOOK: type: QUERY
1826PREHOOK: Input: default@clustergroupby@ds=103
1827PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-32-05_628_4341301404865471977/-mr-10000
1828POSTHOOK: query: select key, count(1) from clustergroupby  where ds='103' group by  value, key limit 10
1829POSTHOOK: type: QUERY
1830POSTHOOK: Input: default@clustergroupby@ds=103
1831POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_01-32-05_628_4341301404865471977/-mr-10000
1832POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1833POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1834POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1835POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1836POSTHOOK: Lineage: clustergroupby PARTITION(ds=102).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1837POSTHOOK: Lineage: clustergroupby PARTITION(ds=102).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
1838POSTHOOK: Lineage: clustergroupby PARTITION(ds=103).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
1839POSTHOOK: Lineage: clustergroupby PARTITION(ds=103).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
18400	3
184110	1
1842100	2
1843103	2
1844104	2
1845105	1
184611	1
1847111	1
1848113	2
1849114	1