Saving all output to "!!{outputDirectory}!!/udf_size.q.raw". Enter "record" with no arguments to stop it. >>> !run !!{qFileDirectory}!!/udf_size.q >>> DESCRIBE FUNCTION size; 'tab_name' 'size(a) - Returns the size of a' 1 row selected >>> DESCRIBE FUNCTION EXTENDED size; 'tab_name' 'size(a) - Returns the size of a' 1 row selected >>> >>> EXPLAIN FROM src_thrift SELECT size(src_thrift.lint), size(src_thrift.lintstring), size(src_thrift.mstringstring), size(null) WHERE src_thrift.lint IS NOT NULL AND NOT (src_thrift.mstringstring IS NULL) LIMIT 1; 'Explain' 'ABSTRACT SYNTAX TREE:' ' (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src_thrift))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION size (. (TOK_TABLE_OR_COL src_thrift) lint))) (TOK_SELEXPR (TOK_FUNCTION size (. (TOK_TABLE_OR_COL src_thrift) lintstring))) (TOK_SELEXPR (TOK_FUNCTION size (. (TOK_TABLE_OR_COL src_thrift) mstringstring))) (TOK_SELEXPR (TOK_FUNCTION size TOK_NULL))) (TOK_WHERE (AND (TOK_FUNCTION TOK_ISNOTNULL (. (TOK_TABLE_OR_COL src_thrift) lint)) (NOT (TOK_FUNCTION TOK_ISNULL (. (TOK_TABLE_OR_COL src_thrift) mstringstring))))) (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_thrift ' ' TableScan' ' alias: src_thrift' ' Filter Operator' ' predicate:' ' expr: (lint is not null and (not mstringstring is null))' ' type: boolean' ' Select Operator' ' expressions:' ' expr: size(lint)' ' type: int' ' expr: size(lintstring)' ' type: int' ' expr: size(mstringstring)' ' type: int' ' expr: size(null)' ' type: int' ' 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' '' '' 42 rows selected >>> >>> >>> FROM src_thrift SELECT size(src_thrift.lint), size(src_thrift.lintstring), size(src_thrift.mstringstring), size(null) WHERE src_thrift.lint IS NOT NULL AND NOT (src_thrift.mstringstring IS NULL) LIMIT 1; '_c0','_c1','_c2','_c3' '3','1','1','-1' 1 row selected >>> !record