PageRenderTime 15ms CodeModel.GetById 7ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
text | 305 lines | 291 code | 14 blank | 0 comment | 0 complexity | 539fa2b9609a2369b75632c109dcd6af MD5 | raw file
  1PREHOOK: query: -- union case: all subqueries are a map-reduce jobs, 3 way union, same input for all sub-queries, followed by filesink
  2
  3create table tmptable(key string, value int)
  4PREHOOK: type: CREATETABLE
  5POSTHOOK: query: -- union case: all subqueries are a map-reduce jobs, 3 way union, same input for all sub-queries, followed by filesink
  6
  7create table tmptable(key string, value int)
  8POSTHOOK: type: CREATETABLE
  9POSTHOOK: Output: default@tmptable
 10PREHOOK: query: explain 
 11insert overwrite table tmptable
 12  select unionsrc.key, unionsrc.value FROM (select 'tst1' as key, count(1) as value from src s1
 13                                        UNION  ALL  
 14                                            select 'tst2' as key, count(1) as value from src s2
 15                                        UNION ALL
 16                                            select 'tst3' as key, count(1) as value from src s3) unionsrc
 17PREHOOK: type: QUERY
 18POSTHOOK: query: explain 
 19insert overwrite table tmptable
 20  select unionsrc.key, unionsrc.value FROM (select 'tst1' as key, count(1) as value from src s1
 21                                        UNION  ALL  
 22                                            select 'tst2' as key, count(1) as value from src s2
 23                                        UNION ALL
 24                                            select 'tst3' as key, count(1) as value from src s3) unionsrc
 25POSTHOOK: type: QUERY
 26ABSTRACT SYNTAX TREE:
 27  (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 'tst1' key) (TOK_SELEXPR (TOK_FUNCTION count 1) value)))) (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src) s2)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR 'tst2' key) (TOK_SELEXPR (TOK_FUNCTION count 1) value))))) (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src) s3)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR 'tst3' key) (TOK_SELEXPR (TOK_FUNCTION count 1) value))))) unionsrc)) (TOK_INSERT (TOK_DESTINATION (TOK_TAB (TOK_TABNAME tmptable))) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL unionsrc) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL unionsrc) value)))))
 28
 29STAGE DEPENDENCIES:
 30  Stage-1 is a root stage
 31  Stage-2 depends on stages: Stage-1, Stage-7, Stage-8
 32  Stage-6 depends on stages: Stage-2 , consists of Stage-5, Stage-4
 33  Stage-5
 34  Stage-0 depends on stages: Stage-5, Stage-4
 35  Stage-3 depends on stages: Stage-0
 36  Stage-4
 37  Stage-7 is a root stage
 38  Stage-8 is a root stage
 39
 40STAGE PLANS:
 41  Stage: Stage-1
 42    Map Reduce
 43      Alias -> Map Operator Tree:
 44        null-subquery1-subquery1:unionsrc-subquery1-subquery1:s1 
 45          TableScan
 46            alias: s1
 47            Select Operator
 48              Group By Operator
 49                aggregations:
 50                      expr: count(1)
 51                bucketGroup: false
 52                mode: hash
 53                outputColumnNames: _col0
 54                Reduce Output Operator
 55                  sort order: 
 56                  tag: -1
 57                  value expressions:
 58                        expr: _col0
 59                        type: bigint
 60      Reduce Operator Tree:
 61        Group By Operator
 62          aggregations:
 63                expr: count(VALUE._col0)
 64          bucketGroup: false
 65          mode: mergepartial
 66          outputColumnNames: _col0
 67          Select Operator
 68            expressions:
 69                  expr: 'tst1'
 70                  type: string
 71                  expr: _col0
 72                  type: bigint
 73            outputColumnNames: _col0, _col1
 74            File Output Operator
 75              compressed: false
 76              GlobalTableId: 0
 77              table:
 78                  input format: org.apache.hadoop.mapred.SequenceFileInputFormat
 79                  output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
 80
 81  Stage: Stage-2
 82    Map Reduce
 83      Alias -> Map Operator Tree:
 84        file:/tmp/sdong/hive_2011-02-10_17-48-28_233_2804783435602164161/-mr-10002 
 85          Union
 86            Select Operator
 87              expressions:
 88                    expr: _col0
 89                    type: string
 90                    expr: _col1
 91                    type: bigint
 92              outputColumnNames: _col0, _col1
 93              Select Operator
 94                expressions:
 95                      expr: _col0
 96                      type: string
 97                      expr: UDFToInteger(_col1)
 98                      type: int
 99                outputColumnNames: _col0, _col1
100                File Output Operator
101                  compressed: false
102                  GlobalTableId: 1
103                  table:
104                      input format: org.apache.hadoop.mapred.TextInputFormat
105                      output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
106                      serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
107                      name: default.tmptable
108        file:/tmp/sdong/hive_2011-02-10_17-48-28_233_2804783435602164161/-mr-10004 
109          Union
110            Select Operator
111              expressions:
112                    expr: _col0
113                    type: string
114                    expr: _col1
115                    type: bigint
116              outputColumnNames: _col0, _col1
117              Select Operator
118                expressions:
119                      expr: _col0
120                      type: string
121                      expr: UDFToInteger(_col1)
122                      type: int
123                outputColumnNames: _col0, _col1
124                File Output Operator
125                  compressed: false
126                  GlobalTableId: 1
127                  table:
128                      input format: org.apache.hadoop.mapred.TextInputFormat
129                      output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
130                      serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
131                      name: default.tmptable
132        file:/tmp/sdong/hive_2011-02-10_17-48-28_233_2804783435602164161/-mr-10005 
133          Union
134            Select Operator
135              expressions:
136                    expr: _col0
137                    type: string
138                    expr: _col1
139                    type: bigint
140              outputColumnNames: _col0, _col1
141              Select Operator
142                expressions:
143                      expr: _col0
144                      type: string
145                      expr: UDFToInteger(_col1)
146                      type: int
147                outputColumnNames: _col0, _col1
148                File Output Operator
149                  compressed: false
150                  GlobalTableId: 1
151                  table:
152                      input format: org.apache.hadoop.mapred.TextInputFormat
153                      output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
154                      serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
155                      name: default.tmptable
156
157  Stage: Stage-6
158    Conditional Operator
159
160  Stage: Stage-5
161    Move Operator
162      files:
163          hdfs directory: true
164          destination: pfile:/data/users/sdong/www/open-source-hive1/build/ql/scratchdir/hive_2011-02-10_17-48-28_233_2804783435602164161/-ext-10000
165
166  Stage: Stage-0
167    Move Operator
168      tables:
169          replace: true
170          table:
171              input format: org.apache.hadoop.mapred.TextInputFormat
172              output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
173              serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
174              name: default.tmptable
175
176  Stage: Stage-3
177    Stats-Aggr Operator
178
179  Stage: Stage-4
180    Map Reduce
181      Alias -> Map Operator Tree:
182        pfile:/data/users/sdong/www/open-source-hive1/build/ql/scratchdir/hive_2011-02-10_17-48-28_233_2804783435602164161/-ext-10003 
183            File Output Operator
184              compressed: false
185              GlobalTableId: 0
186              table:
187                  input format: org.apache.hadoop.mapred.TextInputFormat
188                  output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
189                  serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
190                  name: default.tmptable
191
192  Stage: Stage-7
193    Map Reduce
194      Alias -> Map Operator Tree:
195        null-subquery1-subquery2:unionsrc-subquery1-subquery2:s2 
196          TableScan
197            alias: s2
198            Select Operator
199              Group By Operator
200                aggregations:
201                      expr: count(1)
202                bucketGroup: false
203                mode: hash
204                outputColumnNames: _col0
205                Reduce Output Operator
206                  sort order: 
207                  tag: -1
208                  value expressions:
209                        expr: _col0
210                        type: bigint
211      Reduce Operator Tree:
212        Group By Operator
213          aggregations:
214                expr: count(VALUE._col0)
215          bucketGroup: false
216          mode: mergepartial
217          outputColumnNames: _col0
218          Select Operator
219            expressions:
220                  expr: 'tst2'
221                  type: string
222                  expr: _col0
223                  type: bigint
224            outputColumnNames: _col0, _col1
225            File Output Operator
226              compressed: false
227              GlobalTableId: 0
228              table:
229                  input format: org.apache.hadoop.mapred.SequenceFileInputFormat
230                  output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
231
232  Stage: Stage-8
233    Map Reduce
234      Alias -> Map Operator Tree:
235        null-subquery2:unionsrc-subquery2:s3 
236          TableScan
237            alias: s3
238            Select Operator
239              Group By Operator
240                aggregations:
241                      expr: count(1)
242                bucketGroup: false
243                mode: hash
244                outputColumnNames: _col0
245                Reduce Output Operator
246                  sort order: 
247                  tag: -1
248                  value expressions:
249                        expr: _col0
250                        type: bigint
251      Reduce Operator Tree:
252        Group By Operator
253          aggregations:
254                expr: count(VALUE._col0)
255          bucketGroup: false
256          mode: mergepartial
257          outputColumnNames: _col0
258          Select Operator
259            expressions:
260                  expr: 'tst3'
261                  type: string
262                  expr: _col0
263                  type: bigint
264            outputColumnNames: _col0, _col1
265            File Output Operator
266              compressed: false
267              GlobalTableId: 0
268              table:
269                  input format: org.apache.hadoop.mapred.SequenceFileInputFormat
270                  output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
271
272
273PREHOOK: query: insert overwrite table tmptable
274  select unionsrc.key, unionsrc.value FROM (select 'tst1' as key, count(1) as value from src s1
275                                        UNION  ALL  
276                                            select 'tst2' as key, count(1) as value from src s2
277                                        UNION ALL
278                                            select 'tst3' as key, count(1) as value from src s3) unionsrc
279PREHOOK: type: QUERY
280PREHOOK: Input: default@src
281PREHOOK: Output: default@tmptable
282POSTHOOK: query: insert overwrite table tmptable
283  select unionsrc.key, unionsrc.value FROM (select 'tst1' as key, count(1) as value from src s1
284                                        UNION  ALL  
285                                            select 'tst2' as key, count(1) as value from src s2
286                                        UNION ALL
287                                            select 'tst3' as key, count(1) as value from src s3) unionsrc
288POSTHOOK: type: QUERY
289POSTHOOK: Input: default@src
290POSTHOOK: Output: default@tmptable
291POSTHOOK: Lineage: tmptable.key EXPRESSION []
292POSTHOOK: Lineage: tmptable.value EXPRESSION [(src)s1.null, (src)s2.null, (src)s3.null, ]
293PREHOOK: query: select * from tmptable x sort by x.key
294PREHOOK: type: QUERY
295PREHOOK: Input: default@tmptable
296PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_17-48-43_132_7439555334116715402/-mr-10000
297POSTHOOK: query: select * from tmptable x sort by x.key
298POSTHOOK: type: QUERY
299POSTHOOK: Input: default@tmptable
300POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_17-48-43_132_7439555334116715402/-mr-10000
301POSTHOOK: Lineage: tmptable.key EXPRESSION []
302POSTHOOK: Lineage: tmptable.value EXPRESSION [(src)s1.null, (src)s2.null, (src)s3.null, ]
303tst1	500
304tst2	500
305tst3	500