PREHOOK: query: DESCRIBE FUNCTION length PREHOOK: type: DESCFUNCTION POSTHOOK: query: DESCRIBE FUNCTION length POSTHOOK: type: DESCFUNCTION length(str | binary) - Returns the length of str or number of bytes in binary data PREHOOK: query: DESCRIBE FUNCTION EXTENDED length PREHOOK: type: DESCFUNCTION POSTHOOK: query: DESCRIBE FUNCTION EXTENDED length POSTHOOK: type: DESCFUNCTION length(str | binary) - Returns the length of str or number of bytes in binary data Example: > SELECT length('Facebook') FROM src LIMIT 1; 8 PREHOOK: query: CREATE TABLE dest1(len INT) PREHOOK: type: CREATETABLE POSTHOOK: query: CREATE TABLE dest1(len INT) POSTHOOK: type: CREATETABLE POSTHOOK: Output: default@dest1 PREHOOK: query: EXPLAIN FROM src1 INSERT OVERWRITE TABLE dest1 SELECT length(src1.value) PREHOOK: type: QUERY POSTHOOK: query: EXPLAIN FROM src1 INSERT OVERWRITE TABLE dest1 SELECT length(src1.value) POSTHOOK: type: QUERY ABSTRACT SYNTAX TREE: (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src1))) (TOK_INSERT (TOK_DESTINATION (TOK_TAB (TOK_TABNAME dest1))) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION length (. (TOK_TABLE_OR_COL src1) value)))))) STAGE DEPENDENCIES: Stage-1 is a root stage Stage-5 depends on stages: Stage-1 , consists of Stage-4, Stage-3 Stage-4 Stage-0 depends on stages: Stage-4, Stage-3 Stage-2 depends on stages: Stage-0 Stage-3 STAGE PLANS: Stage: Stage-1 Map Reduce Alias -> Map Operator Tree: src1 TableScan alias: src1 Select Operator expressions: expr: length(value) type: int outputColumnNames: _col0 File Output Operator compressed: false GlobalTableId: 1 table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: default.dest1 Stage: Stage-5 Conditional Operator Stage: Stage-4 Move Operator files: hdfs directory: true destination: pfile:/home/ashutosh/workspace/hive-2380/build/ql/scratchdir/hive_2011-10-05_09-52-19_113_8314061758898168794/-ext-10000 Stage: Stage-0 Move Operator tables: replace: true table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: default.dest1 Stage: Stage-2 Stats-Aggr Operator Stage: Stage-3 Map Reduce Alias -> Map Operator Tree: pfile:/home/ashutosh/workspace/hive-2380/build/ql/scratchdir/hive_2011-10-05_09-52-19_113_8314061758898168794/-ext-10002 File Output Operator compressed: false GlobalTableId: 0 table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: default.dest1 PREHOOK: query: FROM src1 INSERT OVERWRITE TABLE dest1 SELECT length(src1.value) PREHOOK: type: QUERY PREHOOK: Input: default@src1 PREHOOK: Output: default@dest1 POSTHOOK: query: FROM src1 INSERT OVERWRITE TABLE dest1 SELECT length(src1.value) POSTHOOK: type: QUERY POSTHOOK: Input: default@src1 POSTHOOK: Output: default@dest1 POSTHOOK: Lineage: dest1.len EXPRESSION [(src1)src1.FieldSchema(name:value, type:string, comment:default), ] PREHOOK: query: SELECT dest1.* FROM dest1 PREHOOK: type: QUERY PREHOOK: Input: default@dest1 PREHOOK: Output: file:/tmp/ashutosh/hive_2011-10-05_09-52-25_510_4350006026019413926/-mr-10000 POSTHOOK: query: SELECT dest1.* FROM dest1 POSTHOOK: type: QUERY POSTHOOK: Input: default@dest1 POSTHOOK: Output: file:/tmp/ashutosh/hive_2011-10-05_09-52-25_510_4350006026019413926/-mr-10000 POSTHOOK: Lineage: dest1.len EXPRESSION [(src1)src1.FieldSchema(name:value, type:string, comment:default), ] 7 0 7 6 7 7 7 7 6 7 7 7 7 7 7 0 0 6 0 7 7 7 0 0 0 PREHOOK: query: DROP TABLE dest1 PREHOOK: type: DROPTABLE PREHOOK: Input: default@dest1 PREHOOK: Output: default@dest1 POSTHOOK: query: DROP TABLE dest1 POSTHOOK: type: DROPTABLE POSTHOOK: Input: default@dest1 POSTHOOK: Output: default@dest1 POSTHOOK: Lineage: dest1.len EXPRESSION [(src1)src1.FieldSchema(name:value, type:string, comment:default), ] PREHOOK: query: -- Test with non-ascii characters. CREATE TABLE dest1(name STRING) STORED AS TEXTFILE PREHOOK: type: CREATETABLE POSTHOOK: query: -- Test with non-ascii characters. CREATE TABLE dest1(name STRING) STORED AS TEXTFILE POSTHOOK: type: CREATETABLE POSTHOOK: Output: default@dest1 POSTHOOK: Lineage: dest1.len EXPRESSION [(src1)src1.FieldSchema(name:value, type:string, comment:default), ] PREHOOK: query: LOAD DATA LOCAL INPATH '../data/files/kv4.txt' INTO TABLE dest1 PREHOOK: type: LOAD PREHOOK: Output: default@dest1 POSTHOOK: query: LOAD DATA LOCAL INPATH '../data/files/kv4.txt' INTO TABLE dest1 POSTHOOK: type: LOAD POSTHOOK: Output: default@dest1 POSTHOOK: Lineage: dest1.len EXPRESSION [(src1)src1.FieldSchema(name:value, type:string, comment:default), ] PREHOOK: query: EXPLAIN SELECT length(dest1.name) FROM dest1 PREHOOK: type: QUERY POSTHOOK: query: EXPLAIN SELECT length(dest1.name) FROM dest1 POSTHOOK: type: QUERY POSTHOOK: Lineage: dest1.len EXPRESSION [(src1)src1.FieldSchema(name:value, type:string, comment:default), ] 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_FUNCTION length (. (TOK_TABLE_OR_COL dest1) name)))))) 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: length(name) type: int outputColumnNames: _col0 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 PREHOOK: query: SELECT length(dest1.name) FROM dest1 PREHOOK: type: QUERY PREHOOK: Input: default@dest1 PREHOOK: Output: file:/tmp/ashutosh/hive_2011-10-05_09-52-27_079_7431090385926695202/-mr-10000 POSTHOOK: query: SELECT length(dest1.name) FROM dest1 POSTHOOK: type: QUERY POSTHOOK: Input: default@dest1 POSTHOOK: Output: file:/tmp/ashutosh/hive_2011-10-05_09-52-27_079_7431090385926695202/-mr-10000 POSTHOOK: Lineage: dest1.len EXPRESSION [(src1)src1.FieldSchema(name:value, type:string, comment:default), ] 2