Saving all output to "!!{outputDirectory}!!/udf_abs.q.raw". Enter "record" with no arguments to stop it. >>> !run !!{qFileDirectory}!!/udf_abs.q >>> DESCRIBE FUNCTION abs; 'tab_name' 'abs(x) - returns the absolute value of x' 1 row selected >>> DESCRIBE FUNCTION EXTENDED abs; 'tab_name' 'abs(x) - returns the absolute value of x' 'Example:' ' > SELECT abs(0) FROM src LIMIT 1;' ' 0' ' > SELECT abs(-5) FROM src LIMIT 1;' ' 5' 6 rows selected >>> >>> EXPLAIN SELECT abs(0), abs(-1), abs(123), abs(-9223372036854775807), abs(9223372036854775807) FROM src LIMIT 1; '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 abs 0)) (TOK_SELEXPR (TOK_FUNCTION abs (- 1))) (TOK_SELEXPR (TOK_FUNCTION abs 123)) (TOK_SELEXPR (TOK_FUNCTION abs (- 9223372036854775807))) (TOK_SELEXPR (TOK_FUNCTION abs 9223372036854775807))) (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: abs(0)' ' type: int' ' expr: abs((- 1))' ' type: int' ' expr: abs(123)' ' type: int' ' expr: abs((- 9223372036854775807))' ' type: bigint' ' expr: abs(9223372036854775807)' ' type: bigint' ' outputColumnNames: _col0, _col1, _col2, _col3, _col4' ' 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' '' '' 40 rows selected >>> >>> SELECT abs(0), abs(-1), abs(123), abs(-9223372036854775807), abs(9223372036854775807) FROM src LIMIT 1; '_c0','_c1','_c2','_c3','_c4' '0','1','123','9223372036854775807','9223372036854775807' 1 row selected >>> >>> EXPLAIN SELECT abs(0.0), abs(-3.14159265), abs(3.14159265) FROM src LIMIT 1; '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 abs 0.0)) (TOK_SELEXPR (TOK_FUNCTION abs (- 3.14159265))) (TOK_SELEXPR (TOK_FUNCTION abs 3.14159265))) (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: abs(0.0)' ' type: double' ' expr: abs((- 3.14159265))' ' type: double' ' expr: abs(3.14159265)' ' type: double' ' 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: 1' '' '' 36 rows selected >>> >>> SELECT abs(0.0), abs(-3.14159265), abs(3.14159265) FROM src LIMIT 1; '_c0','_c1','_c2' '0.0','3.14159265','3.14159265' 1 row selected >>> !record