Saving all output to "!!{outputDirectory}!!/udf_like.q.raw". Enter "record" with no arguments to stop it. >>> !run !!{qFileDirectory}!!/udf_like.q >>> DESCRIBE FUNCTION like; 'tab_name' 'like(str, pattern) - Checks if str matches pattern' 1 row selected >>> DESCRIBE FUNCTION EXTENDED like; 'tab_name' 'like(str, pattern) - Checks if str matches pattern' 'Example:' ' > SELECT a.* FROM srcpart a WHERE a.hr like '%2' LIMIT 1;' ' 27 val_27 2008-04-08 12' 4 rows selected >>> >>> EXPLAIN SELECT '_%_' LIKE '%\_\%\_%', '__' LIKE '%\_\%\_%', '%%_%_' LIKE '%\_\%\_%', '%_%_%' LIKE '%\%\_\%', '_%_' LIKE '\%\_%', '%__' LIKE '__\%%', '_%' LIKE '\_\%\_\%%', '_%' LIKE '\_\%_%', '%_' LIKE '\%\_', 'ab' LIKE '\%\_', 'ab' LIKE '_a%', 'ab' LIKE 'a','ab' LIKE '','' LIKE '' FROM src WHERE src.key = 86; '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 (LIKE '_%_' '%\_\%\_%')) (TOK_SELEXPR (LIKE '__' '%\_\%\_%')) (TOK_SELEXPR (LIKE '%%_%_' '%\_\%\_%')) (TOK_SELEXPR (LIKE '%_%_%' '%\%\_\%')) (TOK_SELEXPR (LIKE '_%_' '\%\_%')) (TOK_SELEXPR (LIKE '%__' '__\%%')) (TOK_SELEXPR (LIKE '_%' '\_\%\_\%%')) (TOK_SELEXPR (LIKE '_%' '\_\%_%')) (TOK_SELEXPR (LIKE '%_' '\%\_')) (TOK_SELEXPR (LIKE 'ab' '\%\_')) (TOK_SELEXPR (LIKE 'ab' '_a%')) (TOK_SELEXPR (LIKE 'ab' 'a')) (TOK_SELEXPR (LIKE 'ab' '')) (TOK_SELEXPR (LIKE '' ''))) (TOK_WHERE (= (. (TOK_TABLE_OR_COL src) key) 86))))' '' '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' ' Filter Operator' ' predicate:' ' expr: (key = 86.0)' ' type: boolean' ' Select Operator' ' expressions:' ' expr: ('_%_' like '%\_\%\_%')' ' type: boolean' ' expr: ('__' like '%\_\%\_%')' ' type: boolean' ' expr: ('%%_%_' like '%\_\%\_%')' ' type: boolean' ' expr: ('%_%_%' like '%\%\_\%')' ' type: boolean' ' expr: ('_%_' like '\%\_%')' ' type: boolean' ' expr: ('%__' like '__\%%')' ' type: boolean' ' expr: ('_%' like '\_\%\_\%%')' ' type: boolean' ' expr: ('_%' like '\_\%_%')' ' type: boolean' ' expr: ('%_' like '\%\_')' ' type: boolean' ' expr: ('ab' like '\%\_')' ' type: boolean' ' expr: ('ab' like '_a%')' ' type: boolean' ' expr: ('ab' like 'a')' ' type: boolean' ' expr: ('ab' like '')' ' type: boolean' ' expr: ('' like '')' ' type: boolean' ' outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13' ' 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' '' '' 61 rows selected >>> >>> SELECT '_%_' LIKE '%\_\%\_%', '__' LIKE '%\_\%\_%', '%%_%_' LIKE '%\_\%\_%', '%_%_%' LIKE '%\%\_\%', '_%_' LIKE '\%\_%', '%__' LIKE '__\%%', '_%' LIKE '\_\%\_\%%', '_%' LIKE '\_\%_%', '%_' LIKE '\%\_', 'ab' LIKE '\%\_', 'ab' LIKE '_a%', 'ab' LIKE 'a','ab' LIKE '','' LIKE '' FROM src WHERE src.key = 86; '_c0','_c1','_c2','_c3','_c4','_c5','_c6','_c7','_c8','_c9','_c10','_c11','_c12','_c13' 'true','false','true','true','false','false','false','false','true','false','false','false','false','true' 1 row selected >>> >>> >>> SELECT '1+2' LIKE '_+_', '1+2' LIKE '1+_', '112' LIKE '1+_', '|||' LIKE '|_|', '+++' LIKE '1+_' FROM src LIMIT 1; '_c0','_c1','_c2','_c3','_c4' 'true','true','false','true','false' 1 row selected >>> !record