PageRenderTime 19ms CodeModel.GetById 11ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/tags/release-0.2.0-rc0/hive/external/ql/src/test/results/clientpositive/union9.q.out

#
text | 134 lines | 127 code | 7 blank | 0 comment | 0 complexity | 9a128a6e5abe99be1529ec0d1aad740c MD5 | raw file
  1PREHOOK: query: -- union case: all subqueries are a map-only jobs, 3 way union, same input for all sub-queries, followed by reducesink
  2
  3explain 
  4  select count(1) FROM (select s1.key as key, s1.value as value from src s1 UNION  ALL  
  5                        select s2.key as key, s2.value as value from src s2 UNION ALL
  6                        select s3.key as key, s3.value as value from src s3) unionsrc
  7PREHOOK: type: QUERY
  8POSTHOOK: query: -- union case: all subqueries are a map-only jobs, 3 way union, same input for all sub-queries, followed by reducesink
  9
 10explain 
 11  select count(1) FROM (select s1.key as key, s1.value as value from src s1 UNION  ALL  
 12                        select s2.key as key, s2.value as value from src s2 UNION ALL
 13                        select s3.key as key, s3.value as value from src s3) unionsrc
 14POSTHOOK: type: QUERY
 15ABSTRACT SYNTAX TREE:
 16  (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_UNION (TOK_UNION (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src) s1)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL s1) key) key) (TOK_SELEXPR (. (TOK_TABLE_OR_COL s1) value) value)))) (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src) s2)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL s2) key) key) (TOK_SELEXPR (. (TOK_TABLE_OR_COL s2) value) value))))) (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src) s3)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL s3) key) key) (TOK_SELEXPR (. (TOK_TABLE_OR_COL s3) value) value))))) unionsrc)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION count 1)))))
 17
 18STAGE DEPENDENCIES:
 19  Stage-1 is a root stage
 20  Stage-0 is a root stage
 21
 22STAGE PLANS:
 23  Stage: Stage-1
 24    Map Reduce
 25      Alias -> Map Operator Tree:
 26        null-subquery1-subquery1:unionsrc-subquery1-subquery1:s1 
 27          TableScan
 28            alias: s1
 29            Select Operator
 30              expressions:
 31                    expr: key
 32                    type: string
 33                    expr: value
 34                    type: string
 35              outputColumnNames: _col0, _col1
 36              Union
 37                Select Operator
 38                  Group By Operator
 39                    aggregations:
 40                          expr: count(1)
 41                    bucketGroup: false
 42                    mode: hash
 43                    outputColumnNames: _col0
 44                    Reduce Output Operator
 45                      sort order: 
 46                      tag: -1
 47                      value expressions:
 48                            expr: _col0
 49                            type: bigint
 50        null-subquery1-subquery2:unionsrc-subquery1-subquery2:s2 
 51          TableScan
 52            alias: s2
 53            Select Operator
 54              expressions:
 55                    expr: key
 56                    type: string
 57                    expr: value
 58                    type: string
 59              outputColumnNames: _col0, _col1
 60              Union
 61                Select Operator
 62                  Group By Operator
 63                    aggregations:
 64                          expr: count(1)
 65                    bucketGroup: false
 66                    mode: hash
 67                    outputColumnNames: _col0
 68                    Reduce Output Operator
 69                      sort order: 
 70                      tag: -1
 71                      value expressions:
 72                            expr: _col0
 73                            type: bigint
 74        null-subquery2:unionsrc-subquery2:s3 
 75          TableScan
 76            alias: s3
 77            Select Operator
 78              expressions:
 79                    expr: key
 80                    type: string
 81                    expr: value
 82                    type: string
 83              outputColumnNames: _col0, _col1
 84              Union
 85                Select Operator
 86                  Group By Operator
 87                    aggregations:
 88                          expr: count(1)
 89                    bucketGroup: false
 90                    mode: hash
 91                    outputColumnNames: _col0
 92                    Reduce Output Operator
 93                      sort order: 
 94                      tag: -1
 95                      value expressions:
 96                            expr: _col0
 97                            type: bigint
 98      Reduce Operator Tree:
 99        Group By Operator
100          aggregations:
101                expr: count(VALUE._col0)
102          bucketGroup: false
103          mode: mergepartial
104          outputColumnNames: _col0
105          Select Operator
106            expressions:
107                  expr: _col0
108                  type: bigint
109            outputColumnNames: _col0
110            File Output Operator
111              compressed: false
112              GlobalTableId: 0
113              table:
114                  input format: org.apache.hadoop.mapred.TextInputFormat
115                  output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
116
117  Stage: Stage-0
118    Fetch Operator
119      limit: -1
120
121
122PREHOOK: query: select count(1) FROM (select s1.key as key, s1.value as value from src s1 UNION  ALL  
123                        select s2.key as key, s2.value as value from src s2 UNION ALL
124                        select s3.key as key, s3.value as value from src s3) unionsrc
125PREHOOK: type: QUERY
126PREHOOK: Input: default@src
127PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_17-53-16_721_6840297944653186826/-mr-10000
128POSTHOOK: query: select count(1) FROM (select s1.key as key, s1.value as value from src s1 UNION  ALL  
129                        select s2.key as key, s2.value as value from src s2 UNION ALL
130                        select s3.key as key, s3.value as value from src s3) unionsrc
131POSTHOOK: type: QUERY
132POSTHOOK: Input: default@src
133POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_17-53-16_721_6840297944653186826/-mr-10000
1341500