Saving all output to "!!{outputDirectory}!!/create_genericudaf.q.raw". Enter "record" with no arguments to stop it. >>> !run !!{qFileDirectory}!!/create_genericudaf.q >>> EXPLAIN CREATE TEMPORARY FUNCTION test_avg AS 'org.apache.hadoop.hive.ql.udf.generic.GenericUDAFAverage'; 'Explain' 'ABSTRACT SYNTAX TREE:' ' (TOK_CREATEFUNCTION test_avg 'org.apache.hadoop.hive.ql.udf.generic.GenericUDAFAverage')' '' 'STAGE DEPENDENCIES:' ' Stage-0 is a root stage' '' 'STAGE PLANS:' ' Stage: Stage-0' '' '' 10 rows selected >>> >>> CREATE TEMPORARY FUNCTION test_avg AS 'org.apache.hadoop.hive.ql.udf.generic.GenericUDAFAverage'; No rows affected >>> >>> EXPLAIN SELECT test_avg(1), test_avg(substr(value,5)) FROM src; '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 test_avg 1)) (TOK_SELEXPR (TOK_FUNCTION test_avg (TOK_FUNCTION substr (TOK_TABLE_OR_COL value) 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:' ' src ' ' TableScan' ' alias: src' ' Select Operator' ' expressions:' ' expr: value' ' type: string' ' outputColumnNames: value' ' Group By Operator' ' aggregations:' ' expr: test_avg(1)' ' expr: test_avg(substr(value, 5))' ' bucketGroup: false' ' mode: hash' ' outputColumnNames: _col0, _col1' ' Reduce Output Operator' ' sort order: ' ' tag: -1' ' value expressions:' ' expr: _col0' ' type: struct' ' expr: _col1' ' type: struct' ' Reduce Operator Tree:' ' Group By Operator' ' aggregations:' ' expr: test_avg(VALUE._col0)' ' expr: test_avg(VALUE._col1)' ' bucketGroup: false' ' mode: mergepartial' ' outputColumnNames: _col0, _col1' ' Select Operator' ' expressions:' ' expr: _col0' ' type: double' ' expr: _col1' ' type: double' ' 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' '' '' 61 rows selected >>> >>> SELECT test_avg(1), test_avg(substr(value,5)) FROM src; '_c0','_c1' '1.0','260.182' 1 row selected >>> >>> DROP TEMPORARY FUNCTIOn test_avg; No rows affected >>> !record