Saving all output to "!!{outputDirectory}!!/udf_lpad.q.raw". Enter "record" with no arguments to stop it. >>> !run !!{qFileDirectory}!!/udf_lpad.q >>> DESCRIBE FUNCTION lpad; 'tab_name' 'lpad(str, len, pad) - Returns str, left-padded with pad to a length of len' 1 row selected >>> DESCRIBE FUNCTION EXTENDED lpad; 'tab_name' 'lpad(str, len, pad) - Returns str, left-padded with pad to a length of len' 'If str is longer than len, the return value is shortened to len characters.' 'Example:' ' > SELECT lpad('hi', 5, '??') FROM src LIMIT 1;' ' '???hi' > SELECT lpad('hi', 1, '??') FROM src LIMIT 1;' ' 'h'' 6 rows selected >>> >>> EXPLAIN SELECT lpad('hi', 1, '?'), lpad('hi', 5, '.'), lpad('hi', 6, '123') 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 lpad 'hi' 1 '?')) (TOK_SELEXPR (TOK_FUNCTION lpad 'hi' 5 '.')) (TOK_SELEXPR (TOK_FUNCTION lpad 'hi' 6 '123'))) (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: lpad('hi', 1, '?')' ' type: string' ' expr: lpad('hi', 5, '.')' ' type: string' ' expr: lpad('hi', 6, '123')' ' type: string' ' 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 lpad('hi', 1, '?'), lpad('hi', 5, '.'), lpad('hi', 6, '123') FROM src LIMIT 1; '_c0','_c1','_c2' 'h','...hi','1231hi' 1 row selected >>> !record