Saving all output to "!!{outputDirectory}!!/udf6.q.raw". Enter "record" with no arguments to stop it. >>> !run !!{qFileDirectory}!!/udf6.q >>> CREATE TABLE dest1(c1 STRING) STORED AS TEXTFILE; No rows affected >>> >>> FROM src INSERT OVERWRITE TABLE dest1 SELECT ' abc ' WHERE src.key = 86; '_c0' No rows selected >>> >>> EXPLAIN SELECT IF(TRUE, 1, 2) FROM dest1; 'Explain' 'ABSTRACT SYNTAX TREE:' ' (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME dest1))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION IF TRUE 1 2)))))' '' '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:' ' dest1 ' ' TableScan' ' alias: dest1' ' Select Operator' ' expressions:' ' expr: if(true, 1, 2)' ' type: int' ' outputColumnNames: _col0' ' 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' '' '' 31 rows selected >>> >>> SELECT IF(TRUE, 1, 2) FROM dest1; '_c0' '1' 1 row selected >>> >>> EXPLAIN SELECT IF(TRUE, 1, 2), IF(FALSE, 1, 2), IF(NULL, 1, 2), IF(TRUE, "a", "b"), IF(TRUE, 0.1, 0.2), IF(FALSE, CAST(1 AS BIGINT), CAST(2 AS BIGINT)), IF(FALSE, CAST(127 AS TINYINT), CAST(126 AS TINYINT)), IF(FALSE, CAST(127 AS SMALLINT), CAST(128 AS SMALLINT)), CAST(128 AS INT), CAST(1.0 AS DOUBLE), CAST('128' AS STRING) FROM dest1; 'Explain' 'ABSTRACT SYNTAX TREE:' ' (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME dest1))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION IF TRUE 1 2)) (TOK_SELEXPR (TOK_FUNCTION IF FALSE 1 2)) (TOK_SELEXPR (TOK_FUNCTION IF TOK_NULL 1 2)) (TOK_SELEXPR (TOK_FUNCTION IF TRUE "a" "b")) (TOK_SELEXPR (TOK_FUNCTION IF TRUE 0.1 0.2)) (TOK_SELEXPR (TOK_FUNCTION IF FALSE (TOK_FUNCTION TOK_BIGINT 1) (TOK_FUNCTION TOK_BIGINT 2))) (TOK_SELEXPR (TOK_FUNCTION IF FALSE (TOK_FUNCTION TOK_TINYINT 127) (TOK_FUNCTION TOK_TINYINT 126))) (TOK_SELEXPR (TOK_FUNCTION IF FALSE (TOK_FUNCTION TOK_SMALLINT 127) (TOK_FUNCTION TOK_SMALLINT 128))) (TOK_SELEXPR (TOK_FUNCTION TOK_INT 128)) (TOK_SELEXPR (TOK_FUNCTION TOK_DOUBLE 1.0)) (TOK_SELEXPR (TOK_FUNCTION TOK_STRING '128')))))' '' '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:' ' dest1 ' ' TableScan' ' alias: dest1' ' Select Operator' ' expressions:' ' expr: if(true, 1, 2)' ' type: int' ' expr: if(false, 1, 2)' ' type: int' ' expr: if(null, 1, 2)' ' type: int' ' expr: if(true, 'a', 'b')' ' type: string' ' expr: if(true, 0.1, 0.2)' ' type: double' ' expr: if(false, UDFToLong(1), UDFToLong(2))' ' type: bigint' ' expr: if(false, UDFToByte(127), UDFToByte(126))' ' type: tinyint' ' expr: if(false, UDFToShort(127), UDFToShort(128))' ' type: smallint' ' expr: 128' ' type: int' ' expr: 1.0' ' type: double' ' expr: '128'' ' type: string' ' outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10' ' 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' '' 50 rows selected >>> >>> SELECT IF(TRUE, 1, 2), IF(FALSE, 1, 2), IF(NULL, 1, 2), IF(TRUE, "a", "b"), IF(TRUE, 0.1, 0.2), IF(FALSE, CAST(1 AS BIGINT), CAST(2 AS BIGINT)), IF(FALSE, CAST(127 AS TINYINT), CAST(126 AS TINYINT)), IF(FALSE, CAST(127 AS SMALLINT), CAST(128 AS SMALLINT)), CAST(128 AS INT), CAST(1.0 AS DOUBLE), CAST('128' AS STRING) FROM dest1; '_c0','_c1','_c2','_c3','_c4','_c5','_c6','_c7','_c8','_c9','_c10' '1','2','2','a','0.1','2','126','128','128','1.0','128' 1 row selected >>> !record