Saving all output to "!!{outputDirectory}!!/ppd_transform.q.raw". Enter "record" with no arguments to stop it. >>> !run !!{qFileDirectory}!!/ppd_transform.q >>> set hive.optimize.ppd=true; No rows affected >>> set hive.ppd.remove.duplicatefilters=false; No rows affected >>> >>> EXPLAIN FROM ( FROM src SELECT TRANSFORM(src.key, src.value) USING 'cat' AS (tkey, tvalue) CLUSTER BY tkey ) tmap SELECT tmap.tkey, tmap.tvalue WHERE tmap.tkey < 100; 'Explain' 'ABSTRACT SYNTAX TREE:' ' (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TRANSFORM (TOK_EXPLIST (. (TOK_TABLE_OR_COL src) key) (. (TOK_TABLE_OR_COL src) value)) TOK_SERDE TOK_RECORDWRITER 'cat' TOK_SERDE TOK_RECORDREADER (TOK_ALIASLIST tkey tvalue)))) (TOK_CLUSTERBY (TOK_TABLE_OR_COL tkey)))) tmap)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL tmap) tkey)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL tmap) tvalue))) (TOK_WHERE (< (. (TOK_TABLE_OR_COL tmap) tkey) 100))))' '' 'STAGE DEPENDENCIES:' ' Stage-1 is a root stage' ' Stage-0 is a root stage' '' 'STAGE PLANS:' ' Stage: Stage-1' ' Map Reduce' ' Alias -> Map Operator Tree:' ' tmap:src ' ' TableScan' ' alias: src' ' Select Operator' ' expressions:' ' expr: key' ' type: string' ' expr: value' ' type: string' ' outputColumnNames: _col0, _col1' ' Transform Operator' ' command: cat' ' output info:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' Reduce Output Operator' ' key expressions:' ' expr: _col0' ' type: string' ' sort order: +' ' Map-reduce partition columns:' ' expr: _col0' ' type: string' ' tag: -1' ' value expressions:' ' expr: _col0' ' type: string' ' expr: _col1' ' type: string' ' Reduce Operator Tree:' ' Extract' ' Filter Operator' ' predicate:' ' expr: (_col0 < 100.0)' ' type: boolean' ' Select Operator' ' expressions:' ' expr: _col0' ' type: string' ' expr: _col1' ' type: string' ' outputColumnNames: _col0, _col1' ' File Output Operator' ' compressed: false' ' GlobalTableId: 0' ' table:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' '' ' Stage: Stage-0' ' Fetch Operator' ' limit: -1' '' '' 65 rows selected >>> >>> FROM ( FROM src SELECT TRANSFORM(src.key, src.value) USING 'cat' AS (tkey, tvalue) CLUSTER BY tkey ) tmap SELECT tmap.tkey, tmap.tvalue WHERE tmap.tkey < 100; 'tkey','tvalue' '0','val_0' '0','val_0' '0','val_0' '10','val_10' '11','val_11' '12','val_12' '12','val_12' '15','val_15' '15','val_15' '17','val_17' '18','val_18' '18','val_18' '19','val_19' '2','val_2' '20','val_20' '24','val_24' '24','val_24' '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' '37','val_37' '37','val_37' '4','val_4' '41','val_41' '42','val_42' '42','val_42' '43','val_43' '44','val_44' '47','val_47' '5','val_5' '5','val_5' '5','val_5' '51','val_51' '51','val_51' '53','val_53' '54','val_54' '57','val_57' '58','val_58' '58','val_58' '64','val_64' '65','val_65' '66','val_66' '67','val_67' '67','val_67' '69','val_69' '70','val_70' '70','val_70' '70','val_70' '72','val_72' '72','val_72' '74','val_74' '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' '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' '92','val_92' '95','val_95' '95','val_95' '96','val_96' '97','val_97' '97','val_97' '98','val_98' '98','val_98' 84 rows selected >>> >>> set hive.ppd.remove.duplicatefilters=true; No rows affected >>> >>> EXPLAIN FROM ( FROM src SELECT TRANSFORM(src.key, src.value) USING 'cat' AS (tkey, tvalue) CLUSTER BY tkey ) tmap SELECT tmap.tkey, tmap.tvalue WHERE tmap.tkey < 100; 'Explain' 'ABSTRACT SYNTAX TREE:' ' (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TRANSFORM (TOK_EXPLIST (. (TOK_TABLE_OR_COL src) key) (. (TOK_TABLE_OR_COL src) value)) TOK_SERDE TOK_RECORDWRITER 'cat' TOK_SERDE TOK_RECORDREADER (TOK_ALIASLIST tkey tvalue)))) (TOK_CLUSTERBY (TOK_TABLE_OR_COL tkey)))) tmap)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL tmap) tkey)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL tmap) tvalue))) (TOK_WHERE (< (. (TOK_TABLE_OR_COL tmap) tkey) 100))))' '' 'STAGE DEPENDENCIES:' ' Stage-1 is a root stage' ' Stage-0 is a root stage' '' 'STAGE PLANS:' ' Stage: Stage-1' ' Map Reduce' ' Alias -> Map Operator Tree:' ' tmap:src ' ' TableScan' ' alias: src' ' Select Operator' ' expressions:' ' expr: key' ' type: string' ' expr: value' ' type: string' ' outputColumnNames: _col0, _col1' ' Transform Operator' ' command: cat' ' output info:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' Filter Operator' ' predicate:' ' expr: (_col0 < 100.0)' ' type: boolean' ' Reduce Output Operator' ' key expressions:' ' expr: _col0' ' type: string' ' sort order: +' ' Map-reduce partition columns:' ' expr: _col0' ' type: string' ' tag: -1' ' value expressions:' ' expr: _col0' ' type: string' ' expr: _col1' ' type: string' ' Reduce Operator Tree:' ' Extract' ' Select Operator' ' expressions:' ' expr: _col0' ' type: string' ' expr: _col1' ' type: string' ' outputColumnNames: _col0, _col1' ' File Output Operator' ' compressed: false' ' GlobalTableId: 0' ' table:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' '' ' Stage: Stage-0' ' Fetch Operator' ' limit: -1' '' '' 65 rows selected >>> >>> FROM ( FROM src SELECT TRANSFORM(src.key, src.value) USING 'cat' AS (tkey, tvalue) CLUSTER BY tkey ) tmap SELECT tmap.tkey, tmap.tvalue WHERE tmap.tkey < 100; 'tkey','tvalue' '0','val_0' '0','val_0' '0','val_0' '10','val_10' '11','val_11' '12','val_12' '12','val_12' '15','val_15' '15','val_15' '17','val_17' '18','val_18' '18','val_18' '19','val_19' '2','val_2' '20','val_20' '24','val_24' '24','val_24' '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' '37','val_37' '37','val_37' '4','val_4' '41','val_41' '42','val_42' '42','val_42' '43','val_43' '44','val_44' '47','val_47' '5','val_5' '5','val_5' '5','val_5' '51','val_51' '51','val_51' '53','val_53' '54','val_54' '57','val_57' '58','val_58' '58','val_58' '64','val_64' '65','val_65' '66','val_66' '67','val_67' '67','val_67' '69','val_69' '70','val_70' '70','val_70' '70','val_70' '72','val_72' '72','val_72' '74','val_74' '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' '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' '92','val_92' '95','val_95' '95','val_95' '96','val_96' '97','val_97' '97','val_97' '98','val_98' '98','val_98' 84 rows selected >>> !record