Saving all output to "!!{outputDirectory}!!/udf2.q.raw". Enter "record" with no arguments to stop it. >>> !run !!{qFileDirectory}!!/udf2.q >>> CREATE TABLE dest1(c1 STRING) STORED AS TEXTFILE; No rows affected >>> >>> FROM src INSERT OVERWRITE TABLE dest1 SELECT ' abc ' WHERE src.key = 86; '_c0' No rows selected >>> >>> EXPLAIN SELECT '|', trim(dest1.c1), '|', rtrim(dest1.c1), '|', ltrim(dest1.c1), '|' FROM dest1; 'Explain' 'ABSTRACT SYNTAX TREE:' ' (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME dest1))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR '|') (TOK_SELEXPR (TOK_FUNCTION trim (. (TOK_TABLE_OR_COL dest1) c1))) (TOK_SELEXPR '|') (TOK_SELEXPR (TOK_FUNCTION rtrim (. (TOK_TABLE_OR_COL dest1) c1))) (TOK_SELEXPR '|') (TOK_SELEXPR (TOK_FUNCTION ltrim (. (TOK_TABLE_OR_COL dest1) c1))) (TOK_SELEXPR '|'))))' '' '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:' ' dest1 ' ' TableScan' ' alias: dest1' ' Select Operator' ' expressions:' ' expr: '|'' ' type: string' ' expr: trim(c1)' ' type: string' ' expr: '|'' ' type: string' ' expr: rtrim(c1)' ' type: string' ' expr: '|'' ' type: string' ' expr: ltrim(c1)' ' type: string' ' expr: '|'' ' type: string' ' outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6' ' 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' '' '' 43 rows selected >>> >>> SELECT '|', trim(dest1.c1), '|', rtrim(dest1.c1), '|', ltrim(dest1.c1), '|' FROM dest1; '_c0','_c1','_c2','_c3','_c4','_c5','_c6' '|','abc','|',' abc','|','abc ','|' 1 row selected >>> !record