Saving all output to "!!{outputDirectory}!!/udf_space.q.raw". Enter "record" with no arguments to stop it. >>> !run !!{qFileDirectory}!!/udf_space.q >>> DESCRIBE FUNCTION space; 'tab_name' 'space(n) - returns n spaces' 1 row selected >>> DESCRIBE FUNCTION EXTENDED space; 'tab_name' 'space(n) - returns n spaces' 'Example:' ' > SELECT space(2) FROM src LIMIT 1;' ' ' '' 4 rows selected >>> >>> EXPLAIN SELECT space(10), space(0), space(1), space(-1), space(-100) 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 space 10)) (TOK_SELEXPR (TOK_FUNCTION space 0)) (TOK_SELEXPR (TOK_FUNCTION space 1)) (TOK_SELEXPR (TOK_FUNCTION space (- 1))) (TOK_SELEXPR (TOK_FUNCTION space (- 100)))) (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: space(10)' ' type: string' ' expr: space(0)' ' type: string' ' expr: space(1)' ' type: string' ' expr: space((- 1))' ' type: string' ' expr: space((- 100))' ' type: string' ' 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 length(space(10)), length(space(0)), length(space(1)), length(space(-1)), length(space(-100)) FROM src LIMIT 1; '_c0','_c1','_c2','_c3','_c4' '10','0','1','0','0' 1 row selected >>> >>> SELECT space(10), space(0), space(1), space(-1), space(-100) FROM src LIMIT 1; '_c0','_c1','_c2','_c3','_c4' ' ','',' ','','' 1 row selected >>> >>> !record