PREHOOK: query: DESCRIBE FUNCTION reflect2 PREHOOK: type: DESCFUNCTION POSTHOOK: query: DESCRIBE FUNCTION reflect2 POSTHOOK: type: DESCFUNCTION reflect2(arg0,method[,arg1[,arg2..]]) calls method of arg0 with reflection PREHOOK: query: DESCRIBE FUNCTION EXTENDED reflect2 PREHOOK: type: DESCFUNCTION POSTHOOK: query: DESCRIBE FUNCTION EXTENDED reflect2 POSTHOOK: type: DESCFUNCTION reflect2(arg0,method[,arg1[,arg2..]]) calls method of arg0 with reflection Use this UDF to call Java methods by matching the argument signature PREHOOK: query: EXPLAIN EXTENDED SELECT key, reflect2(key, "byteValue"), reflect2(key, "shortValue"), reflect2(key, "intValue"), reflect2(key, "longValue"), reflect2(key, "floatValue"), reflect2(key, "doubleValue"), reflect2(key, "toString"), value, reflect2(value, "concat", "_concat"), reflect2(value, "contains", "86"), reflect2(value, "startsWith", "v"), reflect2(value, "endsWith", "6"), reflect2(value, "equals", "val_86"), reflect2(value, "equalsIgnoreCase", "VAL_86"), reflect2(value, "getBytes"), reflect2(value, "indexOf", "1"), reflect2(value, "lastIndexOf", "1"), reflect2(value, "replace", "val", "VALUE"), reflect2(value, "substring", 1), reflect2(value, "substring", 1, 5), reflect2(value, "toUpperCase"), reflect2(value, "trim"), ts, reflect2(ts, "getYear"), reflect2(ts, "getMonth"), reflect2(ts, "getDay"), reflect2(ts, "getHours"), reflect2(ts, "getMinutes"), reflect2(ts, "getSeconds"), reflect2(ts, "getTime") FROM (select cast(key as int) key, value, cast('2013-02-15 19:41:20' as timestamp) ts from src) a LIMIT 5 PREHOOK: type: QUERY POSTHOOK: query: EXPLAIN EXTENDED SELECT key, reflect2(key, "byteValue"), reflect2(key, "shortValue"), reflect2(key, "intValue"), reflect2(key, "longValue"), reflect2(key, "floatValue"), reflect2(key, "doubleValue"), reflect2(key, "toString"), value, reflect2(value, "concat", "_concat"), reflect2(value, "contains", "86"), reflect2(value, "startsWith", "v"), reflect2(value, "endsWith", "6"), reflect2(value, "equals", "val_86"), reflect2(value, "equalsIgnoreCase", "VAL_86"), reflect2(value, "getBytes"), reflect2(value, "indexOf", "1"), reflect2(value, "lastIndexOf", "1"), reflect2(value, "replace", "val", "VALUE"), reflect2(value, "substring", 1), reflect2(value, "substring", 1, 5), reflect2(value, "toUpperCase"), reflect2(value, "trim"), ts, reflect2(ts, "getYear"), reflect2(ts, "getMonth"), reflect2(ts, "getDay"), reflect2(ts, "getHours"), reflect2(ts, "getMinutes"), reflect2(ts, "getSeconds"), reflect2(ts, "getTime") FROM (select cast(key as int) key, value, cast('2013-02-15 19:41:20' as timestamp) ts from src) a LIMIT 5 POSTHOOK: type: QUERY 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_FUNCTION TOK_INT (TOK_TABLE_OR_COL key)) key) (TOK_SELEXPR (TOK_TABLE_OR_COL value)) (TOK_SELEXPR (TOK_FUNCTION TOK_TIMESTAMP '2013-02-15 19:41:20') ts)))) a)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL key)) (TOK_SELEXPR (TOK_FUNCTION reflect2 (TOK_TABLE_OR_COL key) "byteValue")) (TOK_SELEXPR (TOK_FUNCTION reflect2 (TOK_TABLE_OR_COL key) "shortValue")) (TOK_SELEXPR (TOK_FUNCTION reflect2 (TOK_TABLE_OR_COL key) "intValue")) (TOK_SELEXPR (TOK_FUNCTION reflect2 (TOK_TABLE_OR_COL key) "longValue")) (TOK_SELEXPR (TOK_FUNCTION reflect2 (TOK_TABLE_OR_COL key) "floatValue")) (TOK_SELEXPR (TOK_FUNCTION reflect2 (TOK_TABLE_OR_COL key) "doubleValue")) (TOK_SELEXPR (TOK_FUNCTION reflect2 (TOK_TABLE_OR_COL key) "toString")) (TOK_SELEXPR (TOK_TABLE_OR_COL value)) (TOK_SELEXPR (TOK_FUNCTION reflect2 (TOK_TABLE_OR_COL value) "concat" "_concat")) (TOK_SELEXPR (TOK_FUNCTION reflect2 (TOK_TABLE_OR_COL value) "contains" "86")) (TOK_SELEXPR (TOK_FUNCTION reflect2 (TOK_TABLE_OR_COL value) "startsWith" "v")) (TOK_SELEXPR (TOK_FUNCTION reflect2 (TOK_TABLE_OR_COL value) "endsWith" "6")) (TOK_SELEXPR (TOK_FUNCTION reflect2 (TOK_TABLE_OR_COL value) "equals" "val_86")) (TOK_SELEXPR (TOK_FUNCTION reflect2 (TOK_TABLE_OR_COL value) "equalsIgnoreCase" "VAL_86")) (TOK_SELEXPR (TOK_FUNCTION reflect2 (TOK_TABLE_OR_COL value) "getBytes")) (TOK_SELEXPR (TOK_FUNCTION reflect2 (TOK_TABLE_OR_COL value) "indexOf" "1")) (TOK_SELEXPR (TOK_FUNCTION reflect2 (TOK_TABLE_OR_COL value) "lastIndexOf" "1")) (TOK_SELEXPR (TOK_FUNCTION reflect2 (TOK_TABLE_OR_COL value) "replace" "val" "VALUE")) (TOK_SELEXPR (TOK_FUNCTION reflect2 (TOK_TABLE_OR_COL value) "substring" 1)) (TOK_SELEXPR (TOK_FUNCTION reflect2 (TOK_TABLE_OR_COL value) "substring" 1 5)) (TOK_SELEXPR (TOK_FUNCTION reflect2 (TOK_TABLE_OR_COL value) "toUpperCase")) (TOK_SELEXPR (TOK_FUNCTION reflect2 (TOK_TABLE_OR_COL value) "trim")) (TOK_SELEXPR (TOK_TABLE_OR_COL ts)) (TOK_SELEXPR (TOK_FUNCTION reflect2 (TOK_TABLE_OR_COL ts) "getYear")) (TOK_SELEXPR (TOK_FUNCTION reflect2 (TOK_TABLE_OR_COL ts) "getMonth")) (TOK_SELEXPR (TOK_FUNCTION reflect2 (TOK_TABLE_OR_COL ts) "getDay")) (TOK_SELEXPR (TOK_FUNCTION reflect2 (TOK_TABLE_OR_COL ts) "getHours")) (TOK_SELEXPR (TOK_FUNCTION reflect2 (TOK_TABLE_OR_COL ts) "getMinutes")) (TOK_SELEXPR (TOK_FUNCTION reflect2 (TOK_TABLE_OR_COL ts) "getSeconds")) (TOK_SELEXPR (TOK_FUNCTION reflect2 (TOK_TABLE_OR_COL ts) "getTime"))) (TOK_LIMIT 5))) 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: a:src TableScan alias: src GatherStats: false Select Operator expressions: expr: UDFToInteger(key) type: int expr: value type: string expr: CAST( '2013-02-15 19:41:20' AS TIMESTAMP) type: timestamp outputColumnNames: _col0, _col1, _col2 Select Operator expressions: expr: _col0 type: int expr: reflect2(_col0,'byteValue') type: tinyint expr: reflect2(_col0,'shortValue') type: smallint expr: reflect2(_col0,'intValue') type: int expr: reflect2(_col0,'longValue') type: bigint expr: reflect2(_col0,'floatValue') type: float expr: reflect2(_col0,'doubleValue') type: double expr: reflect2(_col0,'toString') type: string expr: _col1 type: string expr: reflect2(_col1,'concat','_concat') type: string expr: reflect2(_col1,'contains','86') type: boolean expr: reflect2(_col1,'startsWith','v') type: boolean expr: reflect2(_col1,'endsWith','6') type: boolean expr: reflect2(_col1,'equals','val_86') type: boolean expr: reflect2(_col1,'equalsIgnoreCase','VAL_86') type: boolean expr: reflect2(_col1,'getBytes') type: binary expr: reflect2(_col1,'indexOf','1') type: int expr: reflect2(_col1,'lastIndexOf','1') type: int expr: reflect2(_col1,'replace','val','VALUE') type: string expr: reflect2(_col1,'substring',1) type: string expr: reflect2(_col1,'substring',1,5) type: string expr: reflect2(_col1,'toUpperCase') type: string expr: reflect2(_col1,'trim') type: string expr: _col2 type: timestamp expr: reflect2(_col2,'getYear') type: int expr: reflect2(_col2,'getMonth') type: int expr: reflect2(_col2,'getDay') type: int expr: reflect2(_col2,'getHours') type: int expr: reflect2(_col2,'getMinutes') type: int expr: reflect2(_col2,'getSeconds') type: int expr: reflect2(_col2,'getTime') type: bigint outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17, _col18, _col19, _col20, _col21, _col22, _col23, _col24, _col25, _col26, _col27, _col28, _col29, _col30 Limit File Output Operator compressed: false GlobalTableId: 0 #### A masked pattern was here #### NumFilesPerFileSink: 1 #### A masked pattern was here #### table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat properties: columns _col0,_col1,_col2,_col3,_col4,_col5,_col6,_col7,_col8,_col9,_col10,_col11,_col12,_col13,_col14,_col15,_col16,_col17,_col18,_col19,_col20,_col21,_col22,_col23,_col24,_col25,_col26,_col27,_col28,_col29,_col30 columns.types int:tinyint:smallint:int:bigint:float:double:string:string:string:boolean:boolean:boolean:boolean:boolean:binary:int:int:string:string:string:string:string:timestamp:int:int:int:int:int:int:bigint escape.delim \ hive.serialization.extend.nesting.levels true serialization.format 1 TotalFiles: 1 GatherStats: false MultiFileSpray: false Path -> Alias: #### A masked pattern was here #### Path -> Partition: #### A masked pattern was here #### Partition base file name: src input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat properties: bucket_count -1 columns key,value columns.types string:string #### A masked pattern was here #### name default.src numFiles 1 numPartitions 0 numRows 0 rawDataSize 0 serialization.ddl struct src { string key, string value} serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe totalSize 5812 #### A masked pattern was here #### serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat properties: bucket_count -1 columns key,value columns.types string:string #### A masked pattern was here #### name default.src numFiles 1 numPartitions 0 numRows 0 rawDataSize 0 serialization.ddl struct src { string key, string value} serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe totalSize 5812 #### A masked pattern was here #### serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: default.src name: default.src Truncated Path -> Alias: /src [a:src] Stage: Stage-0 Fetch Operator limit: 5 PREHOOK: query: SELECT key, reflect2(key, "byteValue"), reflect2(key, "shortValue"), reflect2(key, "intValue"), reflect2(key, "longValue"), reflect2(key, "floatValue"), reflect2(key, "doubleValue"), reflect2(key, "toString"), value, reflect2(value, "concat", "_concat"), reflect2(value, "contains", "86"), reflect2(value, "startsWith", "v"), reflect2(value, "endsWith", "6"), reflect2(value, "equals", "val_86"), reflect2(value, "equalsIgnoreCase", "VAL_86"), reflect2(value, "getBytes"), reflect2(value, "indexOf", "1"), reflect2(value, "lastIndexOf", "1"), reflect2(value, "replace", "val", "VALUE"), reflect2(value, "substring", 1), reflect2(value, "substring", 1, 5), reflect2(value, "toUpperCase"), reflect2(value, "trim"), ts, reflect2(ts, "getYear"), reflect2(ts, "getMonth"), reflect2(ts, "getDay"), reflect2(ts, "getHours"), reflect2(ts, "getMinutes"), reflect2(ts, "getSeconds"), reflect2(ts, "getTime") FROM (select cast(key as int) key, value, cast('2013-02-15 19:41:20' as timestamp) ts from src) a LIMIT 5 PREHOOK: type: QUERY PREHOOK: Input: default@src #### A masked pattern was here #### POSTHOOK: query: SELECT key, reflect2(key, "byteValue"), reflect2(key, "shortValue"), reflect2(key, "intValue"), reflect2(key, "longValue"), reflect2(key, "floatValue"), reflect2(key, "doubleValue"), reflect2(key, "toString"), value, reflect2(value, "concat", "_concat"), reflect2(value, "contains", "86"), reflect2(value, "startsWith", "v"), reflect2(value, "endsWith", "6"), reflect2(value, "equals", "val_86"), reflect2(value, "equalsIgnoreCase", "VAL_86"), reflect2(value, "getBytes"), reflect2(value, "indexOf", "1"), reflect2(value, "lastIndexOf", "1"), reflect2(value, "replace", "val", "VALUE"), reflect2(value, "substring", 1), reflect2(value, "substring", 1, 5), reflect2(value, "toUpperCase"), reflect2(value, "trim"), ts, reflect2(ts, "getYear"), reflect2(ts, "getMonth"), reflect2(ts, "getDay"), reflect2(ts, "getHours"), reflect2(ts, "getMinutes"), reflect2(ts, "getSeconds"), reflect2(ts, "getTime") FROM (select cast(key as int) key, value, cast('2013-02-15 19:41:20' as timestamp) ts from src) a LIMIT 5 POSTHOOK: type: QUERY POSTHOOK: Input: default@src #### A masked pattern was here #### 238 -18 238 238 238 238.0 238.0 238 val_238 val_238_concat false true false false false val_238 -1 -1 VALUE_238 al_238 al_2 VAL_238 val_238 2013-02-15 19:41:20 113 1 5 19 41 20 1360986080000 86 86 86 86 86 86.0 86.0 86 val_86 val_86_concat true true true true true val_86 -1 -1 VALUE_86 al_86 al_8 VAL_86 val_86 2013-02-15 19:41:20 113 1 5 19 41 20 1360986080000 311 55 311 311 311 311.0 311.0 311 val_311 val_311_concat false true false false false val_311 5 6 VALUE_311 al_311 al_3 VAL_311 val_311 2013-02-15 19:41:20 113 1 5 19 41 20 1360986080000 27 27 27 27 27 27.0 27.0 27 val_27 val_27_concat false true false false false val_27 -1 -1 VALUE_27 al_27 al_2 VAL_27 val_27 2013-02-15 19:41:20 113 1 5 19 41 20 1360986080000 165 -91 165 165 165 165.0 165.0 165 val_165 val_165_concat false true false false false val_165 4 4 VALUE_165 al_165 al_1 VAL_165 val_165 2013-02-15 19:41:20 113 1 5 19 41 20 1360986080000