Saving all output to "!!{outputDirectory}!!/udf_repeat.q.raw". Enter "record" with no arguments to stop it. >>> !run !!{qFileDirectory}!!/udf_repeat.q >>> DESCRIBE FUNCTION repeat; 'tab_name' 'repeat(str, n) - repeat str n times ' 1 row selected >>> DESCRIBE FUNCTION EXTENDED repeat; 'tab_name' 'repeat(str, n) - repeat str n times ' 'Example:' ' > SELECT repeat('123', 2) FROM src LIMIT 1;' ' '123123'' 4 rows selected >>> >>> EXPLAIN SELECT repeat("Facebook", 3), repeat("", 4), repeat("asd", 0), repeat("asdf", -1) 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 repeat "Facebook" 3)) (TOK_SELEXPR (TOK_FUNCTION repeat "" 4)) (TOK_SELEXPR (TOK_FUNCTION repeat "asd" 0)) (TOK_SELEXPR (TOK_FUNCTION repeat "asdf" (- 1)))) (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: repeat('Facebook', 3)' ' type: string' ' expr: repeat('', 4)' ' type: string' ' expr: repeat('asd', 0)' ' type: string' ' expr: repeat('asdf', (- 1))' ' type: string' ' outputColumnNames: _col0, _col1, _col2, _col3' ' 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' '' '' 38 rows selected >>> >>> SELECT repeat("Facebook", 3), repeat("", 4), repeat("asd", 0), repeat("asdf", -1) FROM src LIMIT 1; '_c0','_c1','_c2','_c3' 'FacebookFacebookFacebook','','','' 1 row selected >>> !record