Saving all output to "!!{outputDirectory}!!/ppd_multi_insert.q.raw". Enter "record" with no arguments to stop it. >>> !run !!{qFileDirectory}!!/ppd_multi_insert.q >>> set hive.optimize.ppd=true; No rows affected >>> set hive.ppd.remove.duplicatefilters=false; No rows affected >>> >>> CREATE TABLE mi1(key INT, value STRING) STORED AS TEXTFILE; No rows affected >>> CREATE TABLE mi2(key INT, value STRING) STORED AS TEXTFILE; No rows affected >>> CREATE TABLE mi3(key INT) PARTITIONED BY(ds STRING, hr STRING) STORED AS TEXTFILE; No rows affected >>> >>> EXPLAIN FROM src a JOIN src b ON (a.key = b.key) INSERT OVERWRITE TABLE mi1 SELECT a.* WHERE a.key < 100 INSERT OVERWRITE TABLE mi2 SELECT a.key, a.value WHERE a.key >= 100 and a.key < 200 INSERT OVERWRITE TABLE mi3 PARTITION(ds='2008-04-08', hr='12') SELECT a.key WHERE a.key >= 200 and a.key < 300 INSERT OVERWRITE DIRECTORY '../build/ql/test/data/warehouse/mi4.out' SELECT a.value WHERE a.key >= 300; 'Explain' 'ABSTRACT SYNTAX TREE:' ' (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME src) a) (TOK_TABREF (TOK_TABNAME src) b) (= (. (TOK_TABLE_OR_COL a) key) (. (TOK_TABLE_OR_COL b) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_TAB (TOK_TABNAME mi1))) (TOK_SELECT (TOK_SELEXPR (TOK_ALLCOLREF (TOK_TABNAME a)))) (TOK_WHERE (< (. (TOK_TABLE_OR_COL a) key) 100))) (TOK_INSERT (TOK_DESTINATION (TOK_TAB (TOK_TABNAME mi2))) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) value))) (TOK_WHERE (and (>= (. (TOK_TABLE_OR_COL a) key) 100) (< (. (TOK_TABLE_OR_COL a) key) 200)))) (TOK_INSERT (TOK_DESTINATION (TOK_TAB (TOK_TABNAME mi3) (TOK_PARTSPEC (TOK_PARTVAL ds '2008-04-08') (TOK_PARTVAL hr '12')))) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) key))) (TOK_WHERE (and (>= (. (TOK_TABLE_OR_COL a) key) 200) (< (. (TOK_TABLE_OR_COL a) key) 300)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR '../build/ql/test/data/warehouse/mi4.out')) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) value))) (TOK_WHERE (>= (. (TOK_TABLE_OR_COL a) key) 300))))' '' 'STAGE DEPENDENCIES:' ' Stage-4 is a root stage' ' Stage-0 depends on stages: Stage-4' ' Stage-5 depends on stages: Stage-0' ' Stage-1 depends on stages: Stage-4' ' Stage-6 depends on stages: Stage-1' ' Stage-2 depends on stages: Stage-4' ' Stage-7 depends on stages: Stage-2' ' Stage-3 depends on stages: Stage-4' '' 'STAGE PLANS:' ' Stage: Stage-4' ' Map Reduce' ' Alias -> Map Operator Tree:' ' a ' ' TableScan' ' alias: a' ' Reduce Output Operator' ' key expressions:' ' expr: key' ' type: string' ' sort order: +' ' Map-reduce partition columns:' ' expr: key' ' type: string' ' tag: 0' ' value expressions:' ' expr: key' ' type: string' ' expr: value' ' type: string' ' b ' ' TableScan' ' alias: b' ' Reduce Output Operator' ' key expressions:' ' expr: key' ' type: string' ' sort order: +' ' Map-reduce partition columns:' ' expr: key' ' type: string' ' tag: 1' ' Reduce Operator Tree:' ' Join Operator' ' condition map:' ' Inner Join 0 to 1' ' condition expressions:' ' 0 {VALUE._col0} {VALUE._col1}' ' 1 ' ' handleSkewJoin: false' ' outputColumnNames: _col0, _col1' ' Filter Operator' ' predicate:' ' expr: (_col0 < 100.0)' ' type: boolean' ' Select Operator' ' expressions:' ' expr: _col0' ' type: string' ' expr: _col1' ' type: string' ' outputColumnNames: _col0, _col1' ' Select Operator' ' expressions:' ' expr: UDFToInteger(_col0)' ' type: int' ' expr: _col1' ' type: string' ' outputColumnNames: _col0, _col1' ' File Output Operator' ' compressed: false' ' GlobalTableId: 1' ' table:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: ppd_multi_insert.mi1' ' Filter Operator' ' predicate:' ' expr: ((_col0 >= 100.0) and (_col0 < 200.0))' ' type: boolean' ' Select Operator' ' expressions:' ' expr: _col0' ' type: string' ' expr: _col1' ' type: string' ' outputColumnNames: _col0, _col1' ' Select Operator' ' expressions:' ' expr: UDFToInteger(_col0)' ' type: int' ' expr: _col1' ' type: string' ' outputColumnNames: _col0, _col1' ' File Output Operator' ' compressed: false' ' GlobalTableId: 2' ' table:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: ppd_multi_insert.mi2' ' Filter Operator' ' predicate:' ' expr: ((_col0 >= 200.0) and (_col0 < 300.0))' ' type: boolean' ' Select Operator' ' expressions:' ' expr: _col0' ' type: string' ' outputColumnNames: _col0' ' Select Operator' ' expressions:' ' expr: UDFToInteger(_col0)' ' type: int' ' outputColumnNames: _col0' ' File Output Operator' ' compressed: false' ' GlobalTableId: 3' ' table:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: ppd_multi_insert.mi3' ' Filter Operator' ' predicate:' ' expr: (_col0 >= 300.0)' ' type: boolean' ' Select Operator' ' expressions:' ' expr: _col1' ' type: string' ' outputColumnNames: _col0' ' File Output Operator' ' compressed: false' ' GlobalTableId: 4' ' table:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' '' ' Stage: Stage-0' ' Move Operator' ' tables:' ' replace: true' ' table:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: ppd_multi_insert.mi1' '' ' Stage: Stage-5' ' Stats-Aggr Operator' '' ' Stage: Stage-1' ' Move Operator' ' tables:' ' replace: true' ' table:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: ppd_multi_insert.mi2' '' ' Stage: Stage-6' ' Stats-Aggr Operator' '' ' Stage: Stage-2' ' Move Operator' ' tables:' ' partition:' ' ds 2008-04-08' ' hr 12' ' replace: true' ' table:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: ppd_multi_insert.mi3' '' ' Stage: Stage-7' ' Stats-Aggr Operator' '' ' Stage: Stage-3' ' Move Operator' ' files:' ' hdfs directory: true' ' destination: ../build/ql/test/data/warehouse/mi4.out' '' '' 194 rows selected >>> >>> FROM src a JOIN src b ON (a.key = b.key) INSERT OVERWRITE TABLE mi1 SELECT a.* WHERE a.key < 100 INSERT OVERWRITE TABLE mi2 SELECT a.key, a.value WHERE a.key >= 100 and a.key < 200 INSERT OVERWRITE TABLE mi3 PARTITION(ds='2008-04-08', hr='12') SELECT a.key WHERE a.key >= 200 and a.key < 300 INSERT OVERWRITE DIRECTORY '../build/ql/test/data/warehouse/mi4.out' SELECT a.value WHERE a.key >= 300; 'value' No rows selected >>> >>> SELECT mi1.* FROM mi1; 'key','value' '0','val_0' '0','val_0' '0','val_0' '0','val_0' '0','val_0' '0','val_0' '0','val_0' '0','val_0' '0','val_0' '10','val_10' '11','val_11' '12','val_12' '12','val_12' '12','val_12' '12','val_12' '15','val_15' '15','val_15' '15','val_15' '15','val_15' '17','val_17' '18','val_18' '18','val_18' '18','val_18' '18','val_18' '19','val_19' '2','val_2' '20','val_20' '24','val_24' '24','val_24' '24','val_24' '24','val_24' '26','val_26' '26','val_26' '26','val_26' '26','val_26' '27','val_27' '28','val_28' '30','val_30' '33','val_33' '34','val_34' '35','val_35' '35','val_35' '35','val_35' '35','val_35' '35','val_35' '35','val_35' '35','val_35' '35','val_35' '35','val_35' '37','val_37' '37','val_37' '37','val_37' '37','val_37' '4','val_4' '41','val_41' '42','val_42' '42','val_42' '42','val_42' '42','val_42' '43','val_43' '44','val_44' '47','val_47' '5','val_5' '5','val_5' '5','val_5' '5','val_5' '5','val_5' '5','val_5' '5','val_5' '5','val_5' '5','val_5' '51','val_51' '51','val_51' '51','val_51' '51','val_51' '53','val_53' '54','val_54' '57','val_57' '58','val_58' '58','val_58' '58','val_58' '58','val_58' '64','val_64' '65','val_65' '66','val_66' '67','val_67' '67','val_67' '67','val_67' '67','val_67' '69','val_69' '70','val_70' '70','val_70' '70','val_70' '70','val_70' '70','val_70' '70','val_70' '70','val_70' '70','val_70' '70','val_70' '72','val_72' '72','val_72' '72','val_72' '72','val_72' '74','val_74' '76','val_76' '76','val_76' '76','val_76' '76','val_76' '77','val_77' '78','val_78' '8','val_8' '80','val_80' '82','val_82' '83','val_83' '83','val_83' '83','val_83' '83','val_83' '84','val_84' '84','val_84' '84','val_84' '84','val_84' '85','val_85' '86','val_86' '87','val_87' '9','val_9' '90','val_90' '90','val_90' '90','val_90' '90','val_90' '90','val_90' '90','val_90' '90','val_90' '90','val_90' '90','val_90' '92','val_92' '95','val_95' '95','val_95' '95','val_95' '95','val_95' '96','val_96' '97','val_97' '97','val_97' '97','val_97' '97','val_97' '98','val_98' '98','val_98' '98','val_98' '98','val_98' 148 rows selected >>> SELECT mi2.* FROM mi2; 'key','value' '100','val_100' '100','val_100' '100','val_100' '100','val_100' '103','val_103' '103','val_103' '103','val_103' '103','val_103' '104','val_104' '104','val_104' '104','val_104' '104','val_104' '105','val_105' '111','val_111' '113','val_113' '113','val_113' '113','val_113' '113','val_113' '114','val_114' '116','val_116' '118','val_118' '118','val_118' '118','val_118' '118','val_118' '119','val_119' '119','val_119' '119','val_119' '119','val_119' '119','val_119' '119','val_119' '119','val_119' '119','val_119' '119','val_119' '120','val_120' '120','val_120' '120','val_120' '120','val_120' '125','val_125' '125','val_125' '125','val_125' '125','val_125' '126','val_126' '128','val_128' '128','val_128' '128','val_128' '128','val_128' '128','val_128' '128','val_128' '128','val_128' '128','val_128' '128','val_128' '129','val_129' '129','val_129' '129','val_129' '129','val_129' '131','val_131' '133','val_133' '134','val_134' '134','val_134' '134','val_134' '134','val_134' '136','val_136' '137','val_137' '137','val_137' '137','val_137' '137','val_137' '138','val_138' '138','val_138' '138','val_138' '138','val_138' '138','val_138' '138','val_138' '138','val_138' '138','val_138' '138','val_138' '138','val_138' '138','val_138' '138','val_138' '138','val_138' '138','val_138' '138','val_138' '138','val_138' '143','val_143' '145','val_145' '146','val_146' '146','val_146' '146','val_146' '146','val_146' '149','val_149' '149','val_149' '149','val_149' '149','val_149' '150','val_150' '152','val_152' '152','val_152' '152','val_152' '152','val_152' '153','val_153' '155','val_155' '156','val_156' '157','val_157' '158','val_158' '160','val_160' '162','val_162' '163','val_163' '164','val_164' '164','val_164' '164','val_164' '164','val_164' '165','val_165' '165','val_165' '165','val_165' '165','val_165' '166','val_166' '167','val_167' '167','val_167' '167','val_167' '167','val_167' '167','val_167' '167','val_167' '167','val_167' '167','val_167' '167','val_167' '168','val_168' '169','val_169' '169','val_169' '169','val_169' '169','val_169' '169','val_169' '169','val_169' '169','val_169' '169','val_169' '169','val_169' '169','val_169' '169','val_169' '169','val_169' '169','val_169' '169','val_169' '169','val_169' '169','val_169' '170','val_170' '172','val_172' '172','val_172' '172','val_172' '172','val_172' '174','val_174' '174','val_174' '174','val_174' '174','val_174' '175','val_175' '175','val_175' '175','val_175' '175','val_175' '176','val_176' '176','val_176' '176','val_176' '176','val_176' '177','val_177' '178','val_178' '179','val_179' '179','val_179' '179','val_179' '179','val_179' '180','val_180' '181','val_181' '183','val_183' '186','val_186' '187','val_187' '187','val_187' '187','val_187' '187','val_187' '187','val_187' '187','val_187' '187','val_187' '187','val_187' '187','val_187' '189','val_189' '190','val_190' '191','val_191' '191','val_191' '191','val_191' '191','val_191' '192','val_192' '193','val_193' '193','val_193' '193','val_193' '193','val_193' '193','val_193' '193','val_193' '193','val_193' '193','val_193' '193','val_193' '194','val_194' '195','val_195' '195','val_195' '195','val_195' '195','val_195' '196','val_196' '197','val_197' '197','val_197' '197','val_197' '197','val_197' '199','val_199' '199','val_199' '199','val_199' '199','val_199' '199','val_199' '199','val_199' '199','val_199' '199','val_199' '199','val_199' 211 rows selected >>> SELECT mi3.* FROM mi3; 'key','ds','hr' '200','2008-04-08','12' '200','2008-04-08','12' '200','2008-04-08','12' '200','2008-04-08','12' '201','2008-04-08','12' '202','2008-04-08','12' '203','2008-04-08','12' '203','2008-04-08','12' '203','2008-04-08','12' '203','2008-04-08','12' '205','2008-04-08','12' '205','2008-04-08','12' '205','2008-04-08','12' '205','2008-04-08','12' '207','2008-04-08','12' '207','2008-04-08','12' '207','2008-04-08','12' '207','2008-04-08','12' '208','2008-04-08','12' '208','2008-04-08','12' '208','2008-04-08','12' '208','2008-04-08','12' '208','2008-04-08','12' '208','2008-04-08','12' '208','2008-04-08','12' '208','2008-04-08','12' '208','2008-04-08','12' '209','2008-04-08','12' '209','2008-04-08','12' '209','2008-04-08','12' '209','2008-04-08','12' '213','2008-04-08','12' '213','2008-04-08','12' '213','2008-04-08','12' '213','2008-04-08','12' '214','2008-04-08','12' '216','2008-04-08','12' '216','2008-04-08','12' '216','2008-04-08','12' '216','2008-04-08','12' '217','2008-04-08','12' '217','2008-04-08','12' '217','2008-04-08','12' '217','2008-04-08','12' '218','2008-04-08','12' '219','2008-04-08','12' '219','2008-04-08','12' '219','2008-04-08','12' '219','2008-04-08','12' '221','2008-04-08','12' '221','2008-04-08','12' '221','2008-04-08','12' '221','2008-04-08','12' '222','2008-04-08','12' '223','2008-04-08','12' '223','2008-04-08','12' '223','2008-04-08','12' '223','2008-04-08','12' '224','2008-04-08','12' '224','2008-04-08','12' '224','2008-04-08','12' '224','2008-04-08','12' '226','2008-04-08','12' '228','2008-04-08','12' '229','2008-04-08','12' '229','2008-04-08','12' '229','2008-04-08','12' '229','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '233','2008-04-08','12' '233','2008-04-08','12' '233','2008-04-08','12' '233','2008-04-08','12' '235','2008-04-08','12' '237','2008-04-08','12' '237','2008-04-08','12' '237','2008-04-08','12' '237','2008-04-08','12' '238','2008-04-08','12' '238','2008-04-08','12' '238','2008-04-08','12' '238','2008-04-08','12' '239','2008-04-08','12' '239','2008-04-08','12' '239','2008-04-08','12' '239','2008-04-08','12' '241','2008-04-08','12' '242','2008-04-08','12' '242','2008-04-08','12' '242','2008-04-08','12' '242','2008-04-08','12' '244','2008-04-08','12' '247','2008-04-08','12' '248','2008-04-08','12' '249','2008-04-08','12' '252','2008-04-08','12' '255','2008-04-08','12' '255','2008-04-08','12' '255','2008-04-08','12' '255','2008-04-08','12' '256','2008-04-08','12' '256','2008-04-08','12' '256','2008-04-08','12' '256','2008-04-08','12' '257','2008-04-08','12' '258','2008-04-08','12' '260','2008-04-08','12' '262','2008-04-08','12' '263','2008-04-08','12' '265','2008-04-08','12' '265','2008-04-08','12' '265','2008-04-08','12' '265','2008-04-08','12' '266','2008-04-08','12' '272','2008-04-08','12' '272','2008-04-08','12' '272','2008-04-08','12' '272','2008-04-08','12' '273','2008-04-08','12' '273','2008-04-08','12' '273','2008-04-08','12' '273','2008-04-08','12' '273','2008-04-08','12' '273','2008-04-08','12' '273','2008-04-08','12' '273','2008-04-08','12' '273','2008-04-08','12' '274','2008-04-08','12' '275','2008-04-08','12' '277','2008-04-08','12' '277','2008-04-08','12' '277','2008-04-08','12' '277','2008-04-08','12' '277','2008-04-08','12' '277','2008-04-08','12' '277','2008-04-08','12' '277','2008-04-08','12' '277','2008-04-08','12' '277','2008-04-08','12' '277','2008-04-08','12' '277','2008-04-08','12' '277','2008-04-08','12' '277','2008-04-08','12' '277','2008-04-08','12' '277','2008-04-08','12' '278','2008-04-08','12' '278','2008-04-08','12' '278','2008-04-08','12' '278','2008-04-08','12' '280','2008-04-08','12' '280','2008-04-08','12' '280','2008-04-08','12' '280','2008-04-08','12' '281','2008-04-08','12' '281','2008-04-08','12' '281','2008-04-08','12' '281','2008-04-08','12' '282','2008-04-08','12' '282','2008-04-08','12' '282','2008-04-08','12' '282','2008-04-08','12' '283','2008-04-08','12' '284','2008-04-08','12' '285','2008-04-08','12' '286','2008-04-08','12' '287','2008-04-08','12' '288','2008-04-08','12' '288','2008-04-08','12' '288','2008-04-08','12' '288','2008-04-08','12' '289','2008-04-08','12' '291','2008-04-08','12' '292','2008-04-08','12' '296','2008-04-08','12' '298','2008-04-08','12' '298','2008-04-08','12' '298','2008-04-08','12' '298','2008-04-08','12' '298','2008-04-08','12' '298','2008-04-08','12' '298','2008-04-08','12' '298','2008-04-08','12' '298','2008-04-08','12' 207 rows selected >>> dfs -cat ../build/ql/test/data/warehouse/mi4.out/*; No rows affected >>> >>> >>> set hive.ppd.remove.duplicatefilters=true; No rows affected >>> >>> EXPLAIN FROM src a JOIN src b ON (a.key = b.key) INSERT OVERWRITE TABLE mi1 SELECT a.* WHERE a.key < 100 INSERT OVERWRITE TABLE mi2 SELECT a.key, a.value WHERE a.key >= 100 and a.key < 200 INSERT OVERWRITE TABLE mi3 PARTITION(ds='2008-04-08', hr='12') SELECT a.key WHERE a.key >= 200 and a.key < 300 INSERT OVERWRITE DIRECTORY '../build/ql/test/data/warehouse/mi4.out' SELECT a.value WHERE a.key >= 300; 'Explain' 'ABSTRACT SYNTAX TREE:' ' (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME src) a) (TOK_TABREF (TOK_TABNAME src) b) (= (. (TOK_TABLE_OR_COL a) key) (. (TOK_TABLE_OR_COL b) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_TAB (TOK_TABNAME mi1))) (TOK_SELECT (TOK_SELEXPR (TOK_ALLCOLREF (TOK_TABNAME a)))) (TOK_WHERE (< (. (TOK_TABLE_OR_COL a) key) 100))) (TOK_INSERT (TOK_DESTINATION (TOK_TAB (TOK_TABNAME mi2))) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) value))) (TOK_WHERE (and (>= (. (TOK_TABLE_OR_COL a) key) 100) (< (. (TOK_TABLE_OR_COL a) key) 200)))) (TOK_INSERT (TOK_DESTINATION (TOK_TAB (TOK_TABNAME mi3) (TOK_PARTSPEC (TOK_PARTVAL ds '2008-04-08') (TOK_PARTVAL hr '12')))) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) key))) (TOK_WHERE (and (>= (. (TOK_TABLE_OR_COL a) key) 200) (< (. (TOK_TABLE_OR_COL a) key) 300)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR '../build/ql/test/data/warehouse/mi4.out')) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) value))) (TOK_WHERE (>= (. (TOK_TABLE_OR_COL a) key) 300))))' '' 'STAGE DEPENDENCIES:' ' Stage-4 is a root stage' ' Stage-0 depends on stages: Stage-4' ' Stage-5 depends on stages: Stage-0' ' Stage-1 depends on stages: Stage-4' ' Stage-6 depends on stages: Stage-1' ' Stage-2 depends on stages: Stage-4' ' Stage-7 depends on stages: Stage-2' ' Stage-3 depends on stages: Stage-4' '' 'STAGE PLANS:' ' Stage: Stage-4' ' Map Reduce' ' Alias -> Map Operator Tree:' ' a ' ' TableScan' ' alias: a' ' Reduce Output Operator' ' key expressions:' ' expr: key' ' type: string' ' sort order: +' ' Map-reduce partition columns:' ' expr: key' ' type: string' ' tag: 0' ' value expressions:' ' expr: key' ' type: string' ' expr: value' ' type: string' ' b ' ' TableScan' ' alias: b' ' Reduce Output Operator' ' key expressions:' ' expr: key' ' type: string' ' sort order: +' ' Map-reduce partition columns:' ' expr: key' ' type: string' ' tag: 1' ' Reduce Operator Tree:' ' Join Operator' ' condition map:' ' Inner Join 0 to 1' ' condition expressions:' ' 0 {VALUE._col0} {VALUE._col1}' ' 1 ' ' handleSkewJoin: false' ' outputColumnNames: _col0, _col1' ' Filter Operator' ' predicate:' ' expr: (_col0 < 100.0)' ' type: boolean' ' Select Operator' ' expressions:' ' expr: _col0' ' type: string' ' expr: _col1' ' type: string' ' outputColumnNames: _col0, _col1' ' Select Operator' ' expressions:' ' expr: UDFToInteger(_col0)' ' type: int' ' expr: _col1' ' type: string' ' outputColumnNames: _col0, _col1' ' File Output Operator' ' compressed: false' ' GlobalTableId: 1' ' table:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: ppd_multi_insert.mi1' ' Filter Operator' ' predicate:' ' expr: ((_col0 >= 100.0) and (_col0 < 200.0))' ' type: boolean' ' Select Operator' ' expressions:' ' expr: _col0' ' type: string' ' expr: _col1' ' type: string' ' outputColumnNames: _col0, _col1' ' Select Operator' ' expressions:' ' expr: UDFToInteger(_col0)' ' type: int' ' expr: _col1' ' type: string' ' outputColumnNames: _col0, _col1' ' File Output Operator' ' compressed: false' ' GlobalTableId: 2' ' table:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: ppd_multi_insert.mi2' ' Filter Operator' ' predicate:' ' expr: ((_col0 >= 200.0) and (_col0 < 300.0))' ' type: boolean' ' Select Operator' ' expressions:' ' expr: _col0' ' type: string' ' outputColumnNames: _col0' ' Select Operator' ' expressions:' ' expr: UDFToInteger(_col0)' ' type: int' ' outputColumnNames: _col0' ' File Output Operator' ' compressed: false' ' GlobalTableId: 3' ' table:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: ppd_multi_insert.mi3' ' Filter Operator' ' predicate:' ' expr: (_col0 >= 300.0)' ' type: boolean' ' Select Operator' ' expressions:' ' expr: _col1' ' type: string' ' outputColumnNames: _col0' ' File Output Operator' ' compressed: false' ' GlobalTableId: 4' ' table:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' '' ' Stage: Stage-0' ' Move Operator' ' tables:' ' replace: true' ' table:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: ppd_multi_insert.mi1' '' ' Stage: Stage-5' ' Stats-Aggr Operator' '' ' Stage: Stage-1' ' Move Operator' ' tables:' ' replace: true' ' table:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: ppd_multi_insert.mi2' '' ' Stage: Stage-6' ' Stats-Aggr Operator' '' ' Stage: Stage-2' ' Move Operator' ' tables:' ' partition:' ' ds 2008-04-08' ' hr 12' ' replace: true' ' table:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: ppd_multi_insert.mi3' '' ' Stage: Stage-7' ' Stats-Aggr Operator' '' ' Stage: Stage-3' ' Move Operator' ' files:' ' hdfs directory: true' ' destination: ../build/ql/test/data/warehouse/mi4.out' '' '' 194 rows selected >>> >>> FROM src a JOIN src b ON (a.key = b.key) INSERT OVERWRITE TABLE mi1 SELECT a.* WHERE a.key < 100 INSERT OVERWRITE TABLE mi2 SELECT a.key, a.value WHERE a.key >= 100 and a.key < 200 INSERT OVERWRITE TABLE mi3 PARTITION(ds='2008-04-08', hr='12') SELECT a.key WHERE a.key >= 200 and a.key < 300 INSERT OVERWRITE DIRECTORY '../build/ql/test/data/warehouse/mi4.out' SELECT a.value WHERE a.key >= 300; 'value' No rows selected >>> >>> SELECT mi1.* FROM mi1; 'key','value' '0','val_0' '0','val_0' '0','val_0' '0','val_0' '0','val_0' '0','val_0' '0','val_0' '0','val_0' '0','val_0' '10','val_10' '11','val_11' '12','val_12' '12','val_12' '12','val_12' '12','val_12' '15','val_15' '15','val_15' '15','val_15' '15','val_15' '17','val_17' '18','val_18' '18','val_18' '18','val_18' '18','val_18' '19','val_19' '2','val_2' '20','val_20' '24','val_24' '24','val_24' '24','val_24' '24','val_24' '26','val_26' '26','val_26' '26','val_26' '26','val_26' '27','val_27' '28','val_28' '30','val_30' '33','val_33' '34','val_34' '35','val_35' '35','val_35' '35','val_35' '35','val_35' '35','val_35' '35','val_35' '35','val_35' '35','val_35' '35','val_35' '37','val_37' '37','val_37' '37','val_37' '37','val_37' '4','val_4' '41','val_41' '42','val_42' '42','val_42' '42','val_42' '42','val_42' '43','val_43' '44','val_44' '47','val_47' '5','val_5' '5','val_5' '5','val_5' '5','val_5' '5','val_5' '5','val_5' '5','val_5' '5','val_5' '5','val_5' '51','val_51' '51','val_51' '51','val_51' '51','val_51' '53','val_53' '54','val_54' '57','val_57' '58','val_58' '58','val_58' '58','val_58' '58','val_58' '64','val_64' '65','val_65' '66','val_66' '67','val_67' '67','val_67' '67','val_67' '67','val_67' '69','val_69' '70','val_70' '70','val_70' '70','val_70' '70','val_70' '70','val_70' '70','val_70' '70','val_70' '70','val_70' '70','val_70' '72','val_72' '72','val_72' '72','val_72' '72','val_72' '74','val_74' '76','val_76' '76','val_76' '76','val_76' '76','val_76' '77','val_77' '78','val_78' '8','val_8' '80','val_80' '82','val_82' '83','val_83' '83','val_83' '83','val_83' '83','val_83' '84','val_84' '84','val_84' '84','val_84' '84','val_84' '85','val_85' '86','val_86' '87','val_87' '9','val_9' '90','val_90' '90','val_90' '90','val_90' '90','val_90' '90','val_90' '90','val_90' '90','val_90' '90','val_90' '90','val_90' '92','val_92' '95','val_95' '95','val_95' '95','val_95' '95','val_95' '96','val_96' '97','val_97' '97','val_97' '97','val_97' '97','val_97' '98','val_98' '98','val_98' '98','val_98' '98','val_98' 148 rows selected >>> SELECT mi2.* FROM mi2; 'key','value' '100','val_100' '100','val_100' '100','val_100' '100','val_100' '103','val_103' '103','val_103' '103','val_103' '103','val_103' '104','val_104' '104','val_104' '104','val_104' '104','val_104' '105','val_105' '111','val_111' '113','val_113' '113','val_113' '113','val_113' '113','val_113' '114','val_114' '116','val_116' '118','val_118' '118','val_118' '118','val_118' '118','val_118' '119','val_119' '119','val_119' '119','val_119' '119','val_119' '119','val_119' '119','val_119' '119','val_119' '119','val_119' '119','val_119' '120','val_120' '120','val_120' '120','val_120' '120','val_120' '125','val_125' '125','val_125' '125','val_125' '125','val_125' '126','val_126' '128','val_128' '128','val_128' '128','val_128' '128','val_128' '128','val_128' '128','val_128' '128','val_128' '128','val_128' '128','val_128' '129','val_129' '129','val_129' '129','val_129' '129','val_129' '131','val_131' '133','val_133' '134','val_134' '134','val_134' '134','val_134' '134','val_134' '136','val_136' '137','val_137' '137','val_137' '137','val_137' '137','val_137' '138','val_138' '138','val_138' '138','val_138' '138','val_138' '138','val_138' '138','val_138' '138','val_138' '138','val_138' '138','val_138' '138','val_138' '138','val_138' '138','val_138' '138','val_138' '138','val_138' '138','val_138' '138','val_138' '143','val_143' '145','val_145' '146','val_146' '146','val_146' '146','val_146' '146','val_146' '149','val_149' '149','val_149' '149','val_149' '149','val_149' '150','val_150' '152','val_152' '152','val_152' '152','val_152' '152','val_152' '153','val_153' '155','val_155' '156','val_156' '157','val_157' '158','val_158' '160','val_160' '162','val_162' '163','val_163' '164','val_164' '164','val_164' '164','val_164' '164','val_164' '165','val_165' '165','val_165' '165','val_165' '165','val_165' '166','val_166' '167','val_167' '167','val_167' '167','val_167' '167','val_167' '167','val_167' '167','val_167' '167','val_167' '167','val_167' '167','val_167' '168','val_168' '169','val_169' '169','val_169' '169','val_169' '169','val_169' '169','val_169' '169','val_169' '169','val_169' '169','val_169' '169','val_169' '169','val_169' '169','val_169' '169','val_169' '169','val_169' '169','val_169' '169','val_169' '169','val_169' '170','val_170' '172','val_172' '172','val_172' '172','val_172' '172','val_172' '174','val_174' '174','val_174' '174','val_174' '174','val_174' '175','val_175' '175','val_175' '175','val_175' '175','val_175' '176','val_176' '176','val_176' '176','val_176' '176','val_176' '177','val_177' '178','val_178' '179','val_179' '179','val_179' '179','val_179' '179','val_179' '180','val_180' '181','val_181' '183','val_183' '186','val_186' '187','val_187' '187','val_187' '187','val_187' '187','val_187' '187','val_187' '187','val_187' '187','val_187' '187','val_187' '187','val_187' '189','val_189' '190','val_190' '191','val_191' '191','val_191' '191','val_191' '191','val_191' '192','val_192' '193','val_193' '193','val_193' '193','val_193' '193','val_193' '193','val_193' '193','val_193' '193','val_193' '193','val_193' '193','val_193' '194','val_194' '195','val_195' '195','val_195' '195','val_195' '195','val_195' '196','val_196' '197','val_197' '197','val_197' '197','val_197' '197','val_197' '199','val_199' '199','val_199' '199','val_199' '199','val_199' '199','val_199' '199','val_199' '199','val_199' '199','val_199' '199','val_199' 211 rows selected >>> SELECT mi3.* FROM mi3; 'key','ds','hr' '200','2008-04-08','12' '200','2008-04-08','12' '200','2008-04-08','12' '200','2008-04-08','12' '201','2008-04-08','12' '202','2008-04-08','12' '203','2008-04-08','12' '203','2008-04-08','12' '203','2008-04-08','12' '203','2008-04-08','12' '205','2008-04-08','12' '205','2008-04-08','12' '205','2008-04-08','12' '205','2008-04-08','12' '207','2008-04-08','12' '207','2008-04-08','12' '207','2008-04-08','12' '207','2008-04-08','12' '208','2008-04-08','12' '208','2008-04-08','12' '208','2008-04-08','12' '208','2008-04-08','12' '208','2008-04-08','12' '208','2008-04-08','12' '208','2008-04-08','12' '208','2008-04-08','12' '208','2008-04-08','12' '209','2008-04-08','12' '209','2008-04-08','12' '209','2008-04-08','12' '209','2008-04-08','12' '213','2008-04-08','12' '213','2008-04-08','12' '213','2008-04-08','12' '213','2008-04-08','12' '214','2008-04-08','12' '216','2008-04-08','12' '216','2008-04-08','12' '216','2008-04-08','12' '216','2008-04-08','12' '217','2008-04-08','12' '217','2008-04-08','12' '217','2008-04-08','12' '217','2008-04-08','12' '218','2008-04-08','12' '219','2008-04-08','12' '219','2008-04-08','12' '219','2008-04-08','12' '219','2008-04-08','12' '221','2008-04-08','12' '221','2008-04-08','12' '221','2008-04-08','12' '221','2008-04-08','12' '222','2008-04-08','12' '223','2008-04-08','12' '223','2008-04-08','12' '223','2008-04-08','12' '223','2008-04-08','12' '224','2008-04-08','12' '224','2008-04-08','12' '224','2008-04-08','12' '224','2008-04-08','12' '226','2008-04-08','12' '228','2008-04-08','12' '229','2008-04-08','12' '229','2008-04-08','12' '229','2008-04-08','12' '229','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '230','2008-04-08','12' '233','2008-04-08','12' '233','2008-04-08','12' '233','2008-04-08','12' '233','2008-04-08','12' '235','2008-04-08','12' '237','2008-04-08','12' '237','2008-04-08','12' '237','2008-04-08','12' '237','2008-04-08','12' '238','2008-04-08','12' '238','2008-04-08','12' '238','2008-04-08','12' '238','2008-04-08','12' '239','2008-04-08','12' '239','2008-04-08','12' '239','2008-04-08','12' '239','2008-04-08','12' '241','2008-04-08','12' '242','2008-04-08','12' '242','2008-04-08','12' '242','2008-04-08','12' '242','2008-04-08','12' '244','2008-04-08','12' '247','2008-04-08','12' '248','2008-04-08','12' '249','2008-04-08','12' '252','2008-04-08','12' '255','2008-04-08','12' '255','2008-04-08','12' '255','2008-04-08','12' '255','2008-04-08','12' '256','2008-04-08','12' '256','2008-04-08','12' '256','2008-04-08','12' '256','2008-04-08','12' '257','2008-04-08','12' '258','2008-04-08','12' '260','2008-04-08','12' '262','2008-04-08','12' '263','2008-04-08','12' '265','2008-04-08','12' '265','2008-04-08','12' '265','2008-04-08','12' '265','2008-04-08','12' '266','2008-04-08','12' '272','2008-04-08','12' '272','2008-04-08','12' '272','2008-04-08','12' '272','2008-04-08','12' '273','2008-04-08','12' '273','2008-04-08','12' '273','2008-04-08','12' '273','2008-04-08','12' '273','2008-04-08','12' '273','2008-04-08','12' '273','2008-04-08','12' '273','2008-04-08','12' '273','2008-04-08','12' '274','2008-04-08','12' '275','2008-04-08','12' '277','2008-04-08','12' '277','2008-04-08','12' '277','2008-04-08','12' '277','2008-04-08','12' '277','2008-04-08','12' '277','2008-04-08','12' '277','2008-04-08','12' '277','2008-04-08','12' '277','2008-04-08','12' '277','2008-04-08','12' '277','2008-04-08','12' '277','2008-04-08','12' '277','2008-04-08','12' '277','2008-04-08','12' '277','2008-04-08','12' '277','2008-04-08','12' '278','2008-04-08','12' '278','2008-04-08','12' '278','2008-04-08','12' '278','2008-04-08','12' '280','2008-04-08','12' '280','2008-04-08','12' '280','2008-04-08','12' '280','2008-04-08','12' '281','2008-04-08','12' '281','2008-04-08','12' '281','2008-04-08','12' '281','2008-04-08','12' '282','2008-04-08','12' '282','2008-04-08','12' '282','2008-04-08','12' '282','2008-04-08','12' '283','2008-04-08','12' '284','2008-04-08','12' '285','2008-04-08','12' '286','2008-04-08','12' '287','2008-04-08','12' '288','2008-04-08','12' '288','2008-04-08','12' '288','2008-04-08','12' '288','2008-04-08','12' '289','2008-04-08','12' '291','2008-04-08','12' '292','2008-04-08','12' '296','2008-04-08','12' '298','2008-04-08','12' '298','2008-04-08','12' '298','2008-04-08','12' '298','2008-04-08','12' '298','2008-04-08','12' '298','2008-04-08','12' '298','2008-04-08','12' '298','2008-04-08','12' '298','2008-04-08','12' 207 rows selected >>> dfs -cat ../build/ql/test/data/warehouse/mi4.out/*; No rows affected >>> !record