PREHOOK: query: DESCRIBE FUNCTION elt PREHOOK: type: DESCFUNCTION POSTHOOK: query: DESCRIBE FUNCTION elt POSTHOOK: type: DESCFUNCTION elt(n, str1, str2, ...) - returns the n-th string PREHOOK: query: DESCRIBE FUNCTION EXTENDED elt PREHOOK: type: DESCFUNCTION POSTHOOK: query: DESCRIBE FUNCTION EXTENDED elt POSTHOOK: type: DESCFUNCTION elt(n, str1, str2, ...) - returns the n-th string Example: > SELECT elt(1, 'face', 'book') FROM src LIMIT 1; 'face' PREHOOK: query: EXPLAIN SELECT elt(2, 'abc', 'defg'), elt(3, 'aa', 'bb', 'cc', 'dd', 'ee', 'ff', 'gg'), elt('1', 'abc', 'defg'), elt(2, 'aa', CAST('2' AS TINYINT)), elt(2, 'aa', CAST('12345' AS SMALLINT)), elt(2, 'aa', CAST('123456789012' AS BIGINT)), elt(2, 'aa', CAST(1.25 AS FLOAT)), elt(2, 'aa', CAST(16.0 AS DOUBLE)), elt(null, 'abc', 'defg'), elt(0, 'abc', 'defg'), elt(3, 'abc', 'defg') FROM src LIMIT 1 PREHOOK: type: QUERY POSTHOOK: query: EXPLAIN SELECT elt(2, 'abc', 'defg'), elt(3, 'aa', 'bb', 'cc', 'dd', 'ee', 'ff', 'gg'), elt('1', 'abc', 'defg'), elt(2, 'aa', CAST('2' AS TINYINT)), elt(2, 'aa', CAST('12345' AS SMALLINT)), elt(2, 'aa', CAST('123456789012' AS BIGINT)), elt(2, 'aa', CAST(1.25 AS FLOAT)), elt(2, 'aa', CAST(16.0 AS DOUBLE)), elt(null, 'abc', 'defg'), elt(0, 'abc', 'defg'), elt(3, 'abc', 'defg') FROM src LIMIT 1 POSTHOOK: type: QUERY 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 elt 2 'abc' 'defg')) (TOK_SELEXPR (TOK_FUNCTION elt 3 'aa' 'bb' 'cc' 'dd' 'ee' 'ff' 'gg')) (TOK_SELEXPR (TOK_FUNCTION elt '1' 'abc' 'defg')) (TOK_SELEXPR (TOK_FUNCTION elt 2 'aa' (TOK_FUNCTION TOK_TINYINT '2'))) (TOK_SELEXPR (TOK_FUNCTION elt 2 'aa' (TOK_FUNCTION TOK_SMALLINT '12345'))) (TOK_SELEXPR (TOK_FUNCTION elt 2 'aa' (TOK_FUNCTION TOK_BIGINT '123456789012'))) (TOK_SELEXPR (TOK_FUNCTION elt 2 'aa' (TOK_FUNCTION TOK_FLOAT 1.25))) (TOK_SELEXPR (TOK_FUNCTION elt 2 'aa' (TOK_FUNCTION TOK_DOUBLE 16.0))) (TOK_SELEXPR (TOK_FUNCTION elt TOK_NULL 'abc' 'defg')) (TOK_SELEXPR (TOK_FUNCTION elt 0 'abc' 'defg')) (TOK_SELEXPR (TOK_FUNCTION elt 3 'abc' 'defg'))) (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: elt(2, 'abc', 'defg') type: string expr: elt(3, 'aa', 'bb', 'cc', 'dd', 'ee', 'ff', 'gg') type: string expr: elt('1', 'abc', 'defg') type: string expr: elt(2, 'aa', UDFToByte('2')) type: string expr: elt(2, 'aa', UDFToShort('12345')) type: string expr: elt(2, 'aa', UDFToLong('123456789012')) type: string expr: elt(2, 'aa', UDFToFloat(1.25)) type: string expr: elt(2, 'aa', 16.0) type: string expr: elt(null, 'abc', 'defg') type: string expr: elt(0, 'abc', 'defg') type: string expr: elt(3, 'abc', 'defg') type: string outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10 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 PREHOOK: query: SELECT elt(2, 'abc', 'defg'), elt(3, 'aa', 'bb', 'cc', 'dd', 'ee', 'ff', 'gg'), elt('1', 'abc', 'defg'), elt(2, 'aa', CAST('2' AS TINYINT)), elt(2, 'aa', CAST('12345' AS SMALLINT)), elt(2, 'aa', CAST('123456789012' AS BIGINT)), elt(2, 'aa', CAST(1.25 AS FLOAT)), elt(2, 'aa', CAST(16.0 AS DOUBLE)), elt(null, 'abc', 'defg'), elt(0, 'abc', 'defg'), elt(3, 'abc', 'defg') FROM src LIMIT 1 PREHOOK: type: QUERY PREHOOK: Input: default@src PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_17-33-14_630_8074107803106807260/-mr-10000 POSTHOOK: query: SELECT elt(2, 'abc', 'defg'), elt(3, 'aa', 'bb', 'cc', 'dd', 'ee', 'ff', 'gg'), elt('1', 'abc', 'defg'), elt(2, 'aa', CAST('2' AS TINYINT)), elt(2, 'aa', CAST('12345' AS SMALLINT)), elt(2, 'aa', CAST('123456789012' AS BIGINT)), elt(2, 'aa', CAST(1.25 AS FLOAT)), elt(2, 'aa', CAST(16.0 AS DOUBLE)), elt(null, 'abc', 'defg'), elt(0, 'abc', 'defg'), elt(3, 'abc', 'defg') FROM src LIMIT 1 POSTHOOK: type: QUERY POSTHOOK: Input: default@src POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_17-33-14_630_8074107803106807260/-mr-10000 defg cc abc 2 12345 123456789012 1.25 16.0 NULL NULL NULL