Saving all output to "!!{outputDirectory}!!/udf_case_thrift.q.raw". Enter "record" with no arguments to stop it. >>> !run !!{qFileDirectory}!!/udf_case_thrift.q >>> EXPLAIN SELECT CASE src_thrift.lint[0] WHEN 0 THEN src_thrift.lint[0] + 1 WHEN 1 THEN src_thrift.lint[0] + 2 WHEN 2 THEN 100 ELSE 5 END, CASE src_thrift.lstring[0] WHEN '0' THEN 'zero' WHEN '10' THEN CONCAT(src_thrift.lstring[0], " is ten") ELSE 'default' END, (CASE src_thrift.lstring[0] WHEN '0' THEN src_thrift.lstring ELSE NULL END)[0] FROM src_thrift LIMIT 3; 'Explain' 'ABSTRACT SYNTAX TREE:' ' (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src_thrift))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION CASE ([ (. (TOK_TABLE_OR_COL src_thrift) lint) 0) 0 (+ ([ (. (TOK_TABLE_OR_COL src_thrift) lint) 0) 1) 1 (+ ([ (. (TOK_TABLE_OR_COL src_thrift) lint) 0) 2) 2 100 5)) (TOK_SELEXPR (TOK_FUNCTION CASE ([ (. (TOK_TABLE_OR_COL src_thrift) lstring) 0) '0' 'zero' '10' (TOK_FUNCTION CONCAT ([ (. (TOK_TABLE_OR_COL src_thrift) lstring) 0) " is ten") 'default')) (TOK_SELEXPR ([ (TOK_FUNCTION CASE ([ (. (TOK_TABLE_OR_COL src_thrift) lstring) 0) '0' (. (TOK_TABLE_OR_COL src_thrift) lstring) TOK_NULL) 0))) (TOK_LIMIT 3)))' '' '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_thrift ' ' TableScan' ' alias: src_thrift' ' Select Operator' ' expressions:' ' expr: CASE (lint[0]) WHEN (0) THEN ((lint[0] + 1)) WHEN (1) THEN ((lint[0] + 2)) WHEN (2) THEN (100) ELSE (5) END' ' type: int' ' expr: CASE (lstring[0]) WHEN ('0') THEN ('zero') WHEN ('10') THEN (concat(lstring[0], ' is ten')) ELSE ('default') END' ' type: string' ' expr: CASE (lstring[0]) WHEN ('0') THEN (lstring) ELSE (null) END[0]' ' type: string' ' outputColumnNames: _col0, _col1, _col2' ' 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: 3' '' '' 36 rows selected >>> >>> SELECT CASE src_thrift.lint[0] WHEN 0 THEN src_thrift.lint[0] + 1 WHEN 1 THEN src_thrift.lint[0] + 2 WHEN 2 THEN 100 ELSE 5 END, CASE src_thrift.lstring[0] WHEN '0' THEN 'zero' WHEN '10' THEN CONCAT(src_thrift.lstring[0], " is ten") ELSE 'default' END, (CASE src_thrift.lstring[0] WHEN '0' THEN src_thrift.lstring ELSE NULL END)[0] FROM src_thrift LIMIT 3; '_c0','_c1','_c2' '1','zero','0' '3','10 is ten','' '100','default','' 3 rows selected >>> !record