Saving all output to "!!{outputDirectory}!!/rcfile_merge4.q.raw". Enter "record" with no arguments to stop it. >>> !run !!{qFileDirectory}!!/rcfile_merge4.q >>> set hive.merge.rcfile.block.level=true; No rows affected >>> set mapred.max.split.size=100; No rows affected >>> set mapred.min.split.size=1; No rows affected >>> >>> DROP TABLE rcfile_merge3a; No rows affected >>> DROP TABLE rcfile_merge3b; No rows affected >>> >>> CREATE TABLE rcfile_merge3a (key int, value string) PARTITIONED BY (ds string) STORED AS RCFILE; No rows affected >>> CREATE TABLE rcfile_merge3b (key int, value string) STORED AS TEXTFILE; No rows affected >>> >>> INSERT OVERWRITE TABLE rcfile_merge3a PARTITION (ds='1') SELECT * FROM src; '_col0','_col1' No rows selected >>> INSERT OVERWRITE TABLE rcfile_merge3a PARTITION (ds='2') SELECT * FROM src; '_col0','_col1' No rows selected >>> >>> EXPLAIN INSERT OVERWRITE TABLE rcfile_merge3b SELECT key, value FROM rcfile_merge3a; 'Explain' 'ABSTRACT SYNTAX TREE:' ' (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME rcfile_merge3a))) (TOK_INSERT (TOK_DESTINATION (TOK_TAB (TOK_TABNAME rcfile_merge3b))) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL key)) (TOK_SELEXPR (TOK_TABLE_OR_COL value)))))' '' 'STAGE DEPENDENCIES:' ' Stage-1 is a root stage' ' Stage-7 depends on stages: Stage-1 , consists of Stage-4, Stage-3, Stage-5' ' Stage-4' ' Stage-0 depends on stages: Stage-4, Stage-3, Stage-6' ' Stage-2 depends on stages: Stage-0' ' Stage-3' ' Stage-5' ' Stage-6 depends on stages: Stage-5' '' 'STAGE PLANS:' ' Stage: Stage-1' ' Map Reduce' ' Alias -> Map Operator Tree:' ' rcfile_merge3a ' ' TableScan' ' alias: rcfile_merge3a' ' Select Operator' ' expressions:' ' expr: key' ' type: int' ' expr: value' ' 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: rcfile_merge4.rcfile_merge3b' '' ' Stage: Stage-7' ' Conditional Operator' '' ' Stage: Stage-4' ' Move Operator' ' files:' ' hdfs directory: true' ' destination: pfile:!!{hive.exec.scratchdir}!!' '' ' 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: rcfile_merge4.rcfile_merge3b' '' ' Stage: Stage-2' ' Stats-Aggr Operator' '' ' Stage: Stage-3' ' Map Reduce' ' Alias -> Map Operator Tree:' ' pfile:!!{hive.exec.scratchdir}!! ' ' File Output Operator' ' compressed: false' ' GlobalTableId: 0' ' 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: rcfile_merge4.rcfile_merge3b' '' ' Stage: Stage-5' ' Map Reduce' ' Alias -> Map Operator Tree:' ' pfile:!!{hive.exec.scratchdir}!! ' ' File Output Operator' ' compressed: false' ' GlobalTableId: 0' ' 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: rcfile_merge4.rcfile_merge3b' '' ' Stage: Stage-6' ' Move Operator' ' files:' ' hdfs directory: true' ' destination: pfile:!!{hive.exec.scratchdir}!!' '' '' 91 rows selected >>> INSERT OVERWRITE TABLE rcfile_merge3b SELECT key, value FROM rcfile_merge3a; 'key','value' No rows selected >>> >>> SELECT SUM(HASH(c)) FROM ( SELECT TRANSFORM(key, value) USING 'tr \t _' AS (c) FROM rcfile_merge3a ) t; '_c0' '14412220296' 1 row selected >>> SELECT SUM(HASH(c)) FROM ( SELECT TRANSFORM(key, value) USING 'tr \t _' AS (c) FROM rcfile_merge3b ) t; '_c0' '14412220296' 1 row selected >>> >>> DROP TABLE rcfile_merge3a; No rows affected >>> DROP TABLE rcfile_merge3b; No rows affected >>> !record