PREHOOK: query: CREATE TEMPORARY FUNCTION example_max_n AS 'org.apache.hadoop.hive.contrib.udaf.example.UDAFExampleMaxN' PREHOOK: type: CREATEFUNCTION POSTHOOK: query: CREATE TEMPORARY FUNCTION example_max_n AS 'org.apache.hadoop.hive.contrib.udaf.example.UDAFExampleMaxN' POSTHOOK: type: CREATEFUNCTION PREHOOK: query: EXPLAIN SELECT example_max_n(substr(value,5),10), example_max_n(IF(substr(value,5) > 250, NULL, substr(value,5)),10) FROM src PREHOOK: type: QUERY POSTHOOK: query: EXPLAIN SELECT example_max_n(substr(value,5),10), example_max_n(IF(substr(value,5) > 250, NULL, substr(value,5)),10) FROM src POSTHOOK: type: QUERY ABSTRACT SYNTAX TREE: (TOK_QUERY (TOK_FROM (TOK_TABREF src)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION example_max_n (TOK_FUNCTION substr (TOK_TABLE_OR_COL value) 5) 10)) (TOK_SELEXPR (TOK_FUNCTION example_max_n (TOK_FUNCTION IF (> (TOK_FUNCTION substr (TOK_TABLE_OR_COL value) 5) 250) TOK_NULL (TOK_FUNCTION substr (TOK_TABLE_OR_COL value) 5)) 10))))) 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: value type: string outputColumnNames: value Group By Operator aggregations: expr: example_max_n(substr(value, 5), 10) expr: example_max_n(if((substr(value, 5) > 250), null, substr(value, 5)), 10) bucketGroup: false mode: hash outputColumnNames: _col0, _col1 Reduce Output Operator sort order: tag: -1 value expressions: expr: _col0 type: struct,n:int> expr: _col1 type: struct,n:int> Reduce Operator Tree: Group By Operator aggregations: expr: example_max_n(VALUE._col0) expr: example_max_n(VALUE._col1) bucketGroup: false mode: mergepartial outputColumnNames: _col0, _col1 Select Operator expressions: expr: _col0 type: array expr: _col1 type: array outputColumnNames: _col0, _col1 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 example_max_n(substr(value,5),10), example_max_n(IF(substr(value,5) > 250, NULL, substr(value,5)),10) FROM src PREHOOK: type: QUERY PREHOOK: Input: default@src PREHOOK: Output: file:/data/users/zshao/hadoop_hive_trunk2/build/contrib/scratchdir/hive_2010-02-03_21-18-51_159_789721602553735643/10000 POSTHOOK: query: SELECT example_max_n(substr(value,5),10), example_max_n(IF(substr(value,5) > 250, NULL, substr(value,5)),10) FROM src POSTHOOK: type: QUERY POSTHOOK: Input: default@src POSTHOOK: Output: file:/data/users/zshao/hadoop_hive_trunk2/build/contrib/scratchdir/hive_2010-02-03_21-18-51_159_789721602553735643/10000 [498.0,498.0,498.0,497.0,496.0,495.0,494.0,493.0,492.0,492.0] [249.0,248.0,247.0,244.0,242.0,242.0,241.0,239.0,239.0,238.0] PREHOOK: query: DROP TEMPORARY FUNCTION example_max_n PREHOOK: type: DROPFUNCTION POSTHOOK: query: DROP TEMPORARY FUNCTION example_max_n POSTHOOK: type: DROPFUNCTION