Saving all output to "!!{outputDirectory}!!/udf_when.q.raw". Enter "record" with no arguments to stop it. >>> !run !!{qFileDirectory}!!/udf_when.q >>> DESCRIBE FUNCTION when; 'tab_name' 'There is no documentation for function 'when'' 1 row selected >>> DESCRIBE FUNCTION EXTENDED when; 'tab_name' 'There is no documentation for function 'when'' 1 row selected >>> >>> EXPLAIN SELECT CASE WHEN 1=1 THEN 2 WHEN 1=3 THEN 4 ELSE 5 END, CASE WHEN 6=7 THEN 8 ELSE 9 END, CASE WHEN 10=11 THEN 12 WHEN 13=13 THEN 14 END, CASE WHEN 15=16 THEN 17 WHEN 18=19 THEN 20 END, CASE WHEN 21=22 THEN NULL WHEN 23=23 THEN 24 END, CASE WHEN 25=26 THEN 27 WHEN 28=28 THEN NULL END FROM src LIMIT 1; 'Explain' 'ABSTRACT SYNTAX TREE:' ' (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION WHEN (= 1 1) 2 (= 1 3) 4 5)) (TOK_SELEXPR (TOK_FUNCTION WHEN (= 6 7) 8 9)) (TOK_SELEXPR (TOK_FUNCTION WHEN (= 10 11) 12 (= 13 13) 14)) (TOK_SELEXPR (TOK_FUNCTION WHEN (= 15 16) 17 (= 18 19) 20)) (TOK_SELEXPR (TOK_FUNCTION WHEN (= 21 22) TOK_NULL (= 23 23) 24)) (TOK_SELEXPR (TOK_FUNCTION WHEN (= 25 26) 27 (= 28 28) TOK_NULL))) (TOK_LIMIT 1)))' '' '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:' ' src ' ' TableScan' ' alias: src' ' Select Operator' ' expressions:' ' expr: CASE WHEN ((1 = 1)) THEN (2) WHEN ((1 = 3)) THEN (4) ELSE (5) END' ' type: int' ' expr: CASE WHEN ((6 = 7)) THEN (8) ELSE (9) END' ' type: int' ' expr: CASE WHEN ((10 = 11)) THEN (12) WHEN ((13 = 13)) THEN (14) END' ' type: int' ' expr: CASE WHEN ((15 = 16)) THEN (17) WHEN ((18 = 19)) THEN (20) END' ' type: int' ' expr: CASE WHEN ((21 = 22)) THEN (null) WHEN ((23 = 23)) THEN (24) END' ' type: int' ' expr: CASE WHEN ((25 = 26)) THEN (27) WHEN ((28 = 28)) THEN (null) END' ' type: int' ' outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5' ' Limit' ' 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' '' '' 42 rows selected >>> >>> SELECT CASE WHEN 1=1 THEN 2 WHEN 1=3 THEN 4 ELSE 5 END, CASE WHEN 6=7 THEN 8 ELSE 9 END, CASE WHEN 10=11 THEN 12 WHEN 13=13 THEN 14 END, CASE WHEN 15=16 THEN 17 WHEN 18=19 THEN 20 END, CASE WHEN 21=22 THEN NULL WHEN 23=23 THEN 24 END, CASE WHEN 25=26 THEN 27 WHEN 28=28 THEN NULL END FROM src LIMIT 1; '_c0','_c1','_c2','_c3','_c4','_c5' '2','9','14','','24','' 1 row selected >>> !record