hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject svn commit: r1674132 [4/5] - in /hive/branches/cbo: ./ common/src/java/org/apache/hadoop/hive/conf/ common/src/java/org/apache/hive/common/util/ dev-support/ hcatalog/src/test/e2e/templeton/deployers/ hcatalog/src/test/e2e/templeton/deployers/config/hi...
Date Thu, 16 Apr 2015 18:35:41 GMT
Modified: hive/branches/cbo/ql/src/test/results/clientpositive/tez/optimize_nullscan.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/tez/optimize_nullscan.q.out?rev=1674132&r1=1674131&r2=1674132&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/tez/optimize_nullscan.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/tez/optimize_nullscan.q.out Thu Apr 16 18:35:39 2015
@@ -104,6 +104,29 @@ STAGE PLANS:
 #### A masked pattern was here ####
       Vertices:
         Map 1 
+            Map Operator Tree:
+                TableScan
+                  alias: srcpart
+                  Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+                  GatherStats: false
+                  Filter Operator
+                    isSamplingPred: false
+                    predicate: false (type: boolean)
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+                    Group By Operator
+                      aggregations: count(key)
+                      keys: key (type: string)
+                      mode: hash
+                      outputColumnNames: _col0, _col1
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+                      Reduce Output Operator
+                        key expressions: _col0 (type: string)
+                        sort order: +
+                        Map-reduce partition columns: _col0 (type: string)
+                        Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+                        tag: -1
+                        value expressions: _col1 (type: bigint)
+                        auto parallelism: true
         Reducer 2 
             Needs Tagging: false
             Reduce Operator Tree:
@@ -1656,6 +1679,22 @@ STAGE PLANS:
             Truncated Path -> Alias:
               -mr-10002default.src{} [src]
         Map 5 
+            Map Operator Tree:
+                TableScan
+                  alias: srcpart
+                  Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+                  GatherStats: false
+                  Filter Operator
+                    isSamplingPred: false
+                    predicate: false (type: boolean)
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+                    Reduce Output Operator
+                      key expressions: key (type: string)
+                      sort order: +
+                      Map-reduce partition columns: key (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+                      tag: 1
+                      auto parallelism: true
         Reducer 4 
             Needs Tagging: false
             Reduce Operator Tree:
@@ -1941,3 +1980,156 @@ POSTHOOK: query: select * from src s1, s
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
+PREHOOK: query: explain extended
+select count(1) from src where null = 1
+PREHOOK: type: QUERY
+POSTHOOK: query: explain extended
+select count(1) from src where null = 1
+POSTHOOK: type: QUERY
+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
+               count
+               1
+      TOK_WHERE
+         =
+            TOK_NULL
+            1
+
+
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+  Stage: Stage-1
+    Tez
+      Edges:
+        Reducer 2 <- Map 1 (SIMPLE_EDGE)
+#### A masked pattern was here ####
+      Vertices:
+        Map 1 
+            Map Operator Tree:
+                TableScan
+                  alias: src
+                  Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
+                  GatherStats: false
+                  Filter Operator
+                    isSamplingPred: false
+                    predicate: false (type: boolean)
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: COMPLETE
+                    Group By Operator
+                      aggregations: count(1)
+                      mode: hash
+                      outputColumnNames: _col0
+                      Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
+                      Reduce Output Operator
+                        sort order: 
+                        Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
+                        tag: -1
+                        value expressions: _col0 (type: bigint)
+                        auto parallelism: false
+            Path -> Alias:
+              -mr-10002default.src{} [src]
+            Path -> Partition:
+              -mr-10002default.src{} 
+                Partition
+                  input format: org.apache.hadoop.hive.ql.io.OneNullRowInputFormat
+                  output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                  properties:
+                    COLUMN_STATS_ACCURATE true
+                    bucket_count -1
+                    columns key,value
+                    columns.comments 'default','default'
+                    columns.types string:string
+#### A masked pattern was here ####
+                    name default.src
+                    numFiles 1
+                    numRows 500
+                    rawDataSize 5312
+                    serialization.ddl struct src { string key, string value}
+                    serialization.format 1
+                    serialization.lib org.apache.hadoop.hive.serde2.NullStructSerDe
+                    totalSize 5812
+#### A masked pattern was here ####
+                  serde: org.apache.hadoop.hive.serde2.NullStructSerDe
+                
+                    input format: org.apache.hadoop.mapred.TextInputFormat
+                    output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                    properties:
+                      COLUMN_STATS_ACCURATE true
+                      bucket_count -1
+                      columns key,value
+                      columns.comments 'default','default'
+                      columns.types string:string
+#### A masked pattern was here ####
+                      name default.src
+                      numFiles 1
+                      numRows 500
+                      rawDataSize 5312
+                      serialization.ddl struct src { string key, string value}
+                      serialization.format 1
+                      serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                      totalSize 5812
+#### A masked pattern was here ####
+                    serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                    name: default.src
+                  name: default.src
+            Truncated Path -> Alias:
+              -mr-10002default.src{} [src]
+        Reducer 2 
+            Needs Tagging: false
+            Reduce Operator Tree:
+              Group By Operator
+                aggregations: count(VALUE._col0)
+                mode: mergepartial
+                outputColumnNames: _col0
+                Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
+                File Output Operator
+                  compressed: false
+                  GlobalTableId: 0
+#### A masked pattern was here ####
+                  NumFilesPerFileSink: 1
+                  Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
+#### A masked pattern was here ####
+                  table:
+                      input format: org.apache.hadoop.mapred.TextInputFormat
+                      output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                      properties:
+                        columns _col0
+                        columns.types bigint
+                        escape.delim \
+                        hive.serialization.extend.additional.nesting.levels true
+                        serialization.format 1
+                        serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                      serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                  TotalFiles: 1
+                  GatherStats: false
+                  MultiFileSpray: false
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: select count(1) from src where null = 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
+POSTHOOK: query: select count(1) from src where null = 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+#### A masked pattern was here ####
+0

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/tez/tez_union.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/tez/tez_union.q.out?rev=1674132&r1=1674131&r2=1674132&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/tez/tez_union.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/tez/tez_union.q.out Thu Apr 16 18:35:39 2015
@@ -1253,3 +1253,68 @@ POSTHOOK: query: drop table ut
 POSTHOOK: type: DROPTABLE
 POSTHOOK: Input: default@ut
 POSTHOOK: Output: default@ut
+PREHOOK: query: create table TABLE1(EMP_NAME STRING, EMP_ID INT) ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@TABLE1
+POSTHOOK: query: create table TABLE1(EMP_NAME STRING, EMP_ID INT) ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@TABLE1
+PREHOOK: query: create table table2 (EMP_NAME STRING) PARTITIONED BY (EMP_ID INT) ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@table2
+POSTHOOK: query: create table table2 (EMP_NAME STRING) PARTITIONED BY (EMP_ID INT) ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@table2
+PREHOOK: query: CREATE OR REPLACE VIEW TABLE3 as select EMP_NAME, EMP_ID from TABLE1
+PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@table1
+PREHOOK: Output: database:default
+PREHOOK: Output: default@TABLE3
+POSTHOOK: query: CREATE OR REPLACE VIEW TABLE3 as select EMP_NAME, EMP_ID from TABLE1
+POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@table1
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@TABLE3
+PREHOOK: query: explain formatted select count(*) from TABLE3
+PREHOOK: type: QUERY
+POSTHOOK: query: explain formatted select count(*) from TABLE3
+POSTHOOK: type: QUERY
+#### A masked pattern was here ####
+PREHOOK: query: drop table table2
+PREHOOK: type: DROPTABLE
+PREHOOK: Input: default@table2
+PREHOOK: Output: default@table2
+POSTHOOK: query: drop table table2
+POSTHOOK: type: DROPTABLE
+POSTHOOK: Input: default@table2
+POSTHOOK: Output: default@table2
+PREHOOK: query: create table table2 (EMP_NAME STRING) PARTITIONED BY (EMP_ID INT) ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@table2
+POSTHOOK: query: create table table2 (EMP_NAME STRING) PARTITIONED BY (EMP_ID INT) ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@table2
+PREHOOK: query: CREATE OR REPLACE VIEW TABLE3 as select EMP_NAME, EMP_ID from TABLE1 UNION ALL select EMP_NAME,EMP_ID from TABLE2
+PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@table1
+PREHOOK: Input: default@table2
+PREHOOK: Output: database:default
+PREHOOK: Output: default@TABLE3
+POSTHOOK: query: CREATE OR REPLACE VIEW TABLE3 as select EMP_NAME, EMP_ID from TABLE1 UNION ALL select EMP_NAME,EMP_ID from TABLE2
+POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@table1
+POSTHOOK: Input: default@table2
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@TABLE3
+POSTHOOK: Output: default@table3
+PREHOOK: query: explain formatted select count(*) from TABLE3
+PREHOOK: type: QUERY
+POSTHOOK: query: explain formatted select count(*) from TABLE3
+POSTHOOK: type: QUERY
+#### A masked pattern was here ####

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/tez/tez_union_group_by.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/tez/tez_union_group_by.q.out?rev=1674132&r1=1674131&r2=1674132&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/tez/tez_union_group_by.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/tez/tez_union_group_by.q.out Thu Apr 16 18:35:39 2015
@@ -156,6 +156,24 @@ STAGE PLANS:
 #### A masked pattern was here ####
       Vertices:
         Map 1 
+            Map Operator Tree:
+                TableScan
+                  alias: x
+                  Filter Operator
+                    predicate: ((date < '2014-09-02') and (u <> 0)) (type: boolean)
+                    Select Operator
+                      expressions: u (type: bigint), date (type: string)
+                      outputColumnNames: _col0, _col1
+                      Group By Operator
+                        aggregations: min(_col1)
+                        keys: _col0 (type: bigint)
+                        mode: hash
+                        outputColumnNames: _col0, _col1
+                        Reduce Output Operator
+                          key expressions: _col0 (type: bigint)
+                          sort order: +
+                          Map-reduce partition columns: _col0 (type: bigint)
+                          value expressions: _col1 (type: string)
         Map 10 
             Map Operator Tree:
                 TableScan
@@ -170,8 +188,57 @@ STAGE PLANS:
                       Map-reduce partition columns: t (type: string), st (type: string)
                       Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
         Map 5 
+            Map Operator Tree:
+                TableScan
+                  alias: y
+                  Filter Operator
+                    predicate: ((date < '2014-09-02') and (u <> 0)) (type: boolean)
+                    Select Operator
+                      expressions: u (type: bigint), date (type: string)
+                      outputColumnNames: _col0, _col1
+                      Group By Operator
+                        aggregations: min(_col1)
+                        keys: _col0 (type: bigint)
+                        mode: hash
+                        outputColumnNames: _col0, _col1
+                        Reduce Output Operator
+                          key expressions: _col0 (type: bigint)
+                          sort order: +
+                          Map-reduce partition columns: _col0 (type: bigint)
+                          value expressions: _col1 (type: string)
         Map 6 
+            Map Operator Tree:
+                TableScan
+                  alias: z
+                  Filter Operator
+                    predicate: ((date < '2014-09-02') and (u <> 0)) (type: boolean)
+                    Select Operator
+                      expressions: u (type: bigint), date (type: string)
+                      outputColumnNames: _col0, _col1
+                      Group By Operator
+                        aggregations: min(_col1)
+                        keys: _col0 (type: bigint)
+                        mode: hash
+                        outputColumnNames: _col0, _col1
+                        Reduce Output Operator
+                          key expressions: _col0 (type: bigint)
+                          sort order: +
+                          Map-reduce partition columns: _col0 (type: bigint)
+                          value expressions: _col1 (type: string)
         Map 7 
+            Map Operator Tree:
+                TableScan
+                  alias: x
+                  Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+                  Filter Operator
+                    predicate: (((t is not null and (date >= '2014-03-04')) and (date < '2014-09-03')) and (u <> 0)) (type: boolean)
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+                    Reduce Output Operator
+                      key expressions: t (type: string), st (type: string)
+                      sort order: ++
+                      Map-reduce partition columns: t (type: string), st (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+                      value expressions: u (type: bigint)
         Reducer 3 
             Reduce Operator Tree:
               Group By Operator

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/tez/vector_coalesce.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/tez/vector_coalesce.q.out?rev=1674132&r1=1674131&r2=1674132&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/tez/vector_coalesce.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/tez/vector_coalesce.q.out Thu Apr 16 18:35:39 2015
@@ -68,7 +68,7 @@ STAGE PLANS:
           Filter Operator
             predicate: ctinyint is null (type: boolean)
             Select Operator
-              expressions: null (type: void), cdouble (type: double), cint (type: int), COALESCE((UDFToInteger(null) + 10),(cdouble + log2(cint)),0) (type: double)
+              expressions: null (type: void), cdouble (type: double), cint (type: int), COALESCE(null,(cdouble + log2(cint)),0) (type: double)
               outputColumnNames: _col0, _col1, _col2, _col3
               Limit
                 Number of rows: 10
@@ -117,7 +117,7 @@ STAGE PLANS:
           Filter Operator
             predicate: (cfloat is null and cbigint is null) (type: boolean)
             Select Operator
-              expressions: null (type: void), null (type: void), COALESCE(null,null,0) (type: float)
+              expressions: null (type: void), null (type: void), 0 (type: int)
               outputColumnNames: _col0, _col1, _col2
               Limit
                 Number of rows: 10

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/tez/vector_decimal_udf.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/tez/vector_decimal_udf.q.out?rev=1674132&r1=1674131&r2=1674132&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/tez/vector_decimal_udf.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/tez/vector_decimal_udf.q.out Thu Apr 16 18:35:39 2015
@@ -1191,7 +1191,7 @@ STAGE PLANS:
                   alias: decimal_udf
                   Statistics: Num rows: 38 Data size: 4296 Basic stats: COMPLETE Column stats: NONE
                   Select Operator
-                    expressions: (UDFToDouble(key) / UDFToDouble(null)) (type: double)
+                    expressions: (UDFToDouble(key) / null) (type: double)
                     outputColumnNames: _col0
                     Statistics: Num rows: 38 Data size: 4296 Basic stats: COMPLETE Column stats: NONE
                     Limit
@@ -1204,7 +1204,6 @@ STAGE PLANS:
                             input format: org.apache.hadoop.mapred.TextInputFormat
                             output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                             serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-            Execution mode: vectorized
 
   Stage: Stage-0
     Fetch Operator

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/tez/vector_elt.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/tez/vector_elt.q.out?rev=1674132&r1=1674131&r2=1674132&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/tez/vector_elt.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/tez/vector_elt.q.out Thu Apr 16 18:35:39 2015
@@ -84,7 +84,7 @@ STAGE PLANS:
         TableScan
           alias: alltypesorc
           Select Operator
-            expressions: 'defg' (type: string), 'cc' (type: string), 'abc' (type: string), '2' (type: string), '12345' (type: string), '123456789012' (type: string), '1.25' (type: string), '16.0' (type: string), null (type: void), null (type: void)
+            expressions: 'defg' (type: string), 'cc' (type: string), 'abc' (type: string), '2' (type: string), '12345' (type: string), '123456789012' (type: string), '1.25' (type: string), '16.0' (type: string), null (type: string), null (type: string)
             outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9
             Limit
               Number of rows: 1

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/tez/vectorized_dynamic_partition_pruning.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/tez/vectorized_dynamic_partition_pruning.q.out?rev=1674132&r1=1674131&r2=1674132&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/tez/vectorized_dynamic_partition_pruning.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/tez/vectorized_dynamic_partition_pruning.q.out Thu Apr 16 18:35:39 2015
@@ -2620,6 +2620,19 @@ STAGE PLANS:
 #### A masked pattern was here ####
       Vertices:
         Map 1 
+            Map Operator Tree:
+                TableScan
+                  alias: srcpart
+                  filterExpr: ((ds is not null and hr is not null) and (hr = 13)) (type: boolean)
+                  Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+                  Filter Operator
+                    predicate: ((ds is not null and hr is not null) and (hr = 13)) (type: boolean)
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+                    Reduce Output Operator
+                      key expressions: ds (type: string)
+                      sort order: +
+                      Map-reduce partition columns: ds (type: string)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
         Map 5 
             Map Operator Tree:
                 TableScan
@@ -4652,6 +4665,28 @@ STAGE PLANS:
 #### A masked pattern was here ####
       Vertices:
         Map 1 
+            Map Operator Tree:
+                TableScan
+                  alias: srcpart
+                  filterExpr: ((ds is not null and hr is not null) and (hr = 13)) (type: boolean)
+                  Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+                  Filter Operator
+                    predicate: ((ds is not null and hr is not null) and (hr = 13)) (type: boolean)
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+                    Map Join Operator
+                      condition map:
+                           Inner Join 0 to 1
+                      keys:
+                        0 ds (type: string)
+                        1 ds (type: string)
+                      input vertices:
+                        1 Map 2
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+                      Reduce Output Operator
+                        key expressions: '13' (type: string)
+                        sort order: +
+                        Map-reduce partition columns: '13' (type: string)
+                        Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
         Map 2 
             Map Operator Tree:
                 TableScan

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/udf4.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/udf4.q.out?rev=1674132&r1=1674131&r2=1674132&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/udf4.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/udf4.q.out Thu Apr 16 18:35:39 2015
@@ -77,7 +77,7 @@ STAGE PLANS:
             alias: dest1
             Statistics: Num rows: 1 Data size: 7 Basic stats: COMPLETE Column stats: COMPLETE
             Select Operator
-              expressions: 1.0 (type: double), 2.0 (type: double), -2.0 (type: double), 1 (type: bigint), 1 (type: bigint), -2 (type: bigint), 1.0 (type: double), null (type: void), 0.0 (type: double), 1 (type: bigint), 2 (type: bigint), -1 (type: bigint), 1 (type: bigint), rand(3) (type: double), 3 (type: int), -3 (type: int), 3 (type: int), -1 (type: int), -2 (type: int), -2 (type: tinyint), -2 (type: smallint), -2 (type: bigint), 0 (type: tinyint), 0 (type: smallint), 0 (type: int), 0 (type: bigint), 3 (type: tinyint), 3 (type: smallint), 3 (type: int), 3 (type: bigint), 2 (type: tinyint), 2 (type: smallint), 2 (type: int), 2 (type: bigint)
+              expressions: 1.0 (type: double), 2.0 (type: double), -2.0 (type: double), 1 (type: bigint), 1 (type: bigint), -2 (type: bigint), 1.0 (type: double), null (type: double), 0.0 (type: double), 1 (type: bigint), 2 (type: bigint), -1 (type: bigint), 1 (type: bigint), rand(3) (type: double), 3 (type: int), -3 (type: int), 3 (type: int), -1 (type: int), -2 (type: int), -2 (type: tinyint), -2 (type: smallint), -2 (type: bigint), 0 (type: tinyint), 0 (type: smallint), 0 (type: int), 0 (type: bigint), 3 (type: tinyint), 3 (type: smallint), 3 (type: int), 3 (type: bigint), 2 (type: tinyint), 2 (type: smallint), 2 (type: int), 2 (type: bigint)
               outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17, _col18, _col19, _col20, _col21, _col22, _col23, _col24, _col25, _col26, _col27, _col28, _col29, _col30, _col31, _col32, _col33
               Statistics: Num rows: 1 Data size: 200 Basic stats: COMPLETE Column stats: COMPLETE
               File Output Operator

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/udf6.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/udf6.q.out?rev=1674132&r1=1674131&r2=1674132&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/udf6.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/udf6.q.out Thu Apr 16 18:35:39 2015
@@ -64,33 +64,21 @@ SELECT IF(TRUE, 1, 2), IF(FALSE, 1, 2),
        CAST('128' AS STRING) FROM dest1
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
-  Stage-1 is a root stage
-  Stage-0 depends on stages: Stage-1
+  Stage-0 is a root stage
 
 STAGE PLANS:
-  Stage: Stage-1
-    Map Reduce
-      Map Operator Tree:
-          TableScan
-            alias: dest1
-            Statistics: Num rows: 1 Data size: 7 Basic stats: COMPLETE Column stats: COMPLETE
-            Select Operator
-              expressions: 1 (type: int), 2 (type: int), if(null, 1, 2) (type: int), 'a' (type: string), 0.1 (type: double), 2 (type: bigint), 126 (type: tinyint), 128 (type: smallint), 128 (type: int), 1.0 (type: double), '128' (type: string)
-              outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10
-              Statistics: Num rows: 1 Data size: 220 Basic stats: COMPLETE Column stats: COMPLETE
-              File Output Operator
-                compressed: false
-                Statistics: Num rows: 1 Data size: 220 Basic stats: COMPLETE Column stats: COMPLETE
-                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
-
   Stage: Stage-0
     Fetch Operator
       limit: -1
       Processor Tree:
-        ListSink
+        TableScan
+          alias: dest1
+          Statistics: Num rows: 1 Data size: 7 Basic stats: COMPLETE Column stats: COMPLETE
+          Select Operator
+            expressions: 1 (type: int), 2 (type: int), 2 (type: int), 'a' (type: string), 0.1 (type: double), 2 (type: bigint), 126 (type: tinyint), 128 (type: smallint), 128 (type: int), 1.0 (type: double), '128' (type: string)
+            outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10
+            Statistics: Num rows: 1 Data size: 220 Basic stats: COMPLETE Column stats: COMPLETE
+            ListSink
 
 PREHOOK: query: SELECT IF(TRUE, 1, 2), IF(FALSE, 1, 2), IF(NULL, 1, 2), IF(TRUE, "a", "b"),
        IF(TRUE, 0.1, 0.2), IF(FALSE, CAST(1 AS BIGINT), CAST(2 AS BIGINT)),

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/udf7.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/udf7.q.out?rev=1674132&r1=1674131&r2=1674132&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/udf7.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/udf7.q.out Thu Apr 16 18:35:39 2015
@@ -47,7 +47,7 @@ STAGE PLANS:
           alias: dest1
           Statistics: Num rows: 1 Data size: 7 Basic stats: COMPLETE Column stats: COMPLETE
           Select Operator
-            expressions: 1.098612288668 (type: double), null (type: void), null (type: void), 1.098612288668 (type: double), null (type: void), null (type: void), 1.584962500721 (type: double), null (type: void), null (type: void), 0.47712125472 (type: double), null (type: void), null (type: void), 1.584962500721 (type: double), null (type: void), null (type: void), null (type: void), -1.0 (type: double), 7.389056098931 (type: double), 8.0 (type: double), 8.0 (type: double), 0.125 (type: double), 8.0 (type: double), 2.0 (type: double), NaN (type: double), 1.0 (type: double), 1.0 (type: double), 8.0 (type: double), 8.0 (type: double)
+            expressions: 1.098612288668 (type: double), null (type: double), null (type: double), 1.098612288668 (type: double), null (type: double), null (type: double), 1.584962500721 (type: double), null (type: double), null (type: double), 0.47712125472 (type: double), null (type: double), null (type: double), 1.584962500721 (type: double), null (type: double), null (type: double), null (type: double), -1.0 (type: double), 7.389056098931 (type: double), 8.0 (type: double), 8.0 (type: double), 0.125 (type: double), 8.0 (type: double), 2.0 (type: double), NaN (type: double), 1.0 (type: double), 1.0 (type: double), 8.0 (type: double), 8.0 (type: double)
             outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17, _col18, _col19, _col20, _col21, _col22, _col23, _col24, _col25, _col26, _col27
             Statistics: Num rows: 1 Data size: 136 Basic stats: COMPLETE Column stats: COMPLETE
             ListSink

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/udf_case.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/udf_case.q.out?rev=1674132&r1=1674131&r2=1674132&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/udf_case.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/udf_case.q.out Thu Apr 16 18:35:39 2015
@@ -89,7 +89,7 @@ STAGE PLANS:
           Row Limit Per Split: 1
           Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
           Select Operator
-            expressions: 2 (type: int), 5 (type: int), 15 (type: int), null (type: void), CASE (17) WHEN (18) THEN (null) WHEN (17) THEN (20) END (type: int), 24 (type: int)
+            expressions: 2 (type: int), 5 (type: int), 15 (type: int), null (type: int), 20 (type: int), 24 (type: int)
             outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
             Statistics: Num rows: 500 Data size: 10000 Basic stats: COMPLETE Column stats: COMPLETE
             ListSink

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/udf_coalesce.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/udf_coalesce.q.out?rev=1674132&r1=1674131&r2=1674132&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/udf_coalesce.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/udf_coalesce.q.out Thu Apr 16 18:35:39 2015
@@ -66,9 +66,9 @@ STAGE PLANS:
           Row Limit Per Split: 1
           Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
           Select Operator
-            expressions: 1 (type: int), 1 (type: int), COALESCE(null,2) (type: int), COALESCE(1,null) (type: int), COALESCE(null,null,3) (type: int), COALESCE(4,null,null,null) (type: int), '1' (type: string), '1' (type: string), COALESCE(null,'2') (type: string), COALESCE('1',null) (type: string), COALESCE(null,null,'3') (type: string), COALESCE('4',null,null,null) (type: string), 1.0 (type: double), 1.0 (type: double), COALESCE(null,2.0) (type: double), COALESCE(null,2.0,3.0) (type: double), COALESCE(2.0,null,3.0) (type: double), COALESCE(if(true, null, 0),null) (type: int)
+            expressions: 1 (type: int), 1 (type: int), 2 (type: int), 1 (type: int), 3 (type: int), 4 (type: int), '1' (type: string), '1' (type: string), '2' (type: string), '1' (type: string), '3' (type: string), '4' (type: string), 1.0 (type: double), 1.0 (type: double), 2.0 (type: double), 2.0 (type: double), 2.0 (type: double), null (type: int)
             outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17
-            Statistics: Num rows: 500 Data size: 289000 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 500 Data size: 287000 Basic stats: COMPLETE Column stats: COMPLETE
             ListSink
 
 PREHOOK: query: SELECT COALESCE(1),

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/udf_elt.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/udf_elt.q.out?rev=1674132&r1=1674131&r2=1674132&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/udf_elt.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/udf_elt.q.out Thu Apr 16 18:35:39 2015
@@ -52,9 +52,9 @@ STAGE PLANS:
           Row Limit Per Split: 1
           Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
           Select Operator
-            expressions: 'defg' (type: string), 'cc' (type: string), 'abc' (type: string), '2' (type: string), '12345' (type: string), '123456789012' (type: string), '1.25' (type: string), '16.0' (type: string), elt(null, 'abc', 'defg') (type: string), null (type: void), null (type: void)
+            expressions: 'defg' (type: string), 'cc' (type: string), 'abc' (type: string), '2' (type: string), '12345' (type: string), '123456789012' (type: string), '1.25' (type: string), '16.0' (type: string), null (type: string), null (type: string), null (type: string)
             outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10
-            Statistics: Num rows: 500 Data size: 395500 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 500 Data size: 353500 Basic stats: COMPLETE Column stats: COMPLETE
             ListSink
 
 PREHOOK: query: SELECT elt(2, 'abc', 'defg'),

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/udf_greatest.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/udf_greatest.q.out?rev=1674132&r1=1674131&r2=1674132&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/udf_greatest.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/udf_greatest.q.out Thu Apr 16 18:35:39 2015
@@ -58,9 +58,9 @@ STAGE PLANS:
           Row Limit Per Split: 1
           Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
           Select Operator
-            expressions: 'c' (type: string), 'a' (type: string), 'AaA' (type: string), 'AAA' (type: string), '13' (type: string), '2' (type: string), '03' (type: string), '1' (type: string), greatest(null,'b','c') (type: string), greatest('a',null,'c') (type: string), greatest('a','b',null) (type: string), greatest('a',null,null) (type: string), greatest(null,'b',null) (type: string), greatest(UDFToString(null),null,null) (type: string)
+            expressions: 'c' (type: string), 'a' (type: string), 'AaA' (type: string), 'AAA' (type: string), '13' (type: string), '2' (type: string), '03' (type: string), '1' (type: string), 'c' (type: string), 'c' (type: string), 'b' (type: string), 'a' (type: string), 'b' (type: string), null (type: string)
             outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13
-            Statistics: Num rows: 500 Data size: 597500 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 500 Data size: 555500 Basic stats: COMPLETE Column stats: COMPLETE
             ListSink
 
 PREHOOK: query: SELECT GREATEST('a', 'b', 'c'),

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/udf_hour.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/udf_hour.q.out?rev=1674132&r1=1674131&r2=1674132&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/udf_hour.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/udf_hour.q.out Thu Apr 16 18:35:39 2015
@@ -39,7 +39,7 @@ STAGE PLANS:
             predicate: (UDFToDouble(key) = 86.0) (type: boolean)
             Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
             Select Operator
-              expressions: 13 (type: int), 13 (type: int), null (type: void)
+              expressions: 13 (type: int), 13 (type: int), null (type: int)
               outputColumnNames: _col0, _col1, _col2
               Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
               ListSink

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/udf_if.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/udf_if.q.out?rev=1674132&r1=1674131&r2=1674132&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/udf_if.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/udf_if.q.out Thu Apr 16 18:35:39 2015
@@ -39,9 +39,9 @@ STAGE PLANS:
           Row Limit Per Split: 1
           Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
           Select Operator
-            expressions: 1 (type: int), if(false, UDFToString(null), '1') (type: string), 1 (type: int), if(true, 1, null) (type: int), if(true, null, 1) (type: int), if(if(true, null, false), 1, 2) (type: int)
+            expressions: 1 (type: int), '1' (type: string), 1 (type: int), 1 (type: int), null (type: int), 2 (type: int)
             outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-            Statistics: Num rows: 500 Data size: 52500 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 500 Data size: 50500 Basic stats: COMPLETE Column stats: COMPLETE
             ListSink
 
 PREHOOK: query: SELECT IF(TRUE, 1, 2) AS COL1,

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/udf_instr.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/udf_instr.q.out?rev=1674132&r1=1674131&r2=1674132&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/udf_instr.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/udf_instr.q.out Thu Apr 16 18:35:39 2015
@@ -56,9 +56,9 @@ STAGE PLANS:
           Row Limit Per Split: 1
           Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
           Select Operator
-            expressions: 1 (type: int), 0 (type: int), 2 (type: int), 2 (type: int), 0 (type: int), 0 (type: int), 2 (type: int), 3 (type: int), 4 (type: int), 2 (type: int), 3 (type: int), instr(null, 'abc') (type: int), instr('abcd', null) (type: int)
+            expressions: 1 (type: int), 0 (type: int), 2 (type: int), 2 (type: int), 0 (type: int), 0 (type: int), 2 (type: int), 3 (type: int), 4 (type: int), 2 (type: int), 3 (type: int), null (type: int), null (type: int)
             outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12
-            Statistics: Num rows: 500 Data size: 26000 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 500 Data size: 22000 Basic stats: COMPLETE Column stats: COMPLETE
             ListSink
 
 PREHOOK: query: SELECT instr('abcd', 'abc'),

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/udf_isnull_isnotnull.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/udf_isnull_isnotnull.q.out?rev=1674132&r1=1674131&r2=1674132&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/udf_isnull_isnotnull.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/udf_isnull_isnotnull.q.out Thu Apr 16 18:35:39 2015
@@ -44,7 +44,7 @@ STAGE PLANS:
           alias: src
           Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
           Select Operator
-            expressions: null is null (type: boolean), true (type: boolean), true (type: boolean)
+            expressions: true (type: boolean), true (type: boolean), true (type: boolean)
             outputColumnNames: _col0, _col1, _col2
             Statistics: Num rows: 500 Data size: 6000 Basic stats: COMPLETE Column stats: COMPLETE
             Limit

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/udf_least.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/udf_least.q.out?rev=1674132&r1=1674131&r2=1674132&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/udf_least.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/udf_least.q.out Thu Apr 16 18:35:39 2015
@@ -58,9 +58,9 @@ STAGE PLANS:
           Row Limit Per Split: 1
           Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
           Select Operator
-            expressions: 'a' (type: string), 'B' (type: string), 'AAA' (type: string), 'A' (type: string), '11' (type: string), '11' (type: string), '01' (type: string), '01' (type: string), least(null,'b','c') (type: string), least('a',null,'c') (type: string), least('a','b',null) (type: string), least('a',null,null) (type: string), least(null,'b',null) (type: string), least(UDFToString(null),null,null) (type: string)
+            expressions: 'a' (type: string), 'B' (type: string), 'AAA' (type: string), 'A' (type: string), '11' (type: string), '11' (type: string), '01' (type: string), '01' (type: string), 'b' (type: string), 'a' (type: string), 'a' (type: string), 'a' (type: string), 'b' (type: string), null (type: string)
             outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13
-            Statistics: Num rows: 500 Data size: 597500 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 500 Data size: 555500 Basic stats: COMPLETE Column stats: COMPLETE
             ListSink
 
 PREHOOK: query: SELECT LEAST('a', 'b', 'c'),

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/udf_locate.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/udf_locate.q.out?rev=1674132&r1=1674131&r2=1674132&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/udf_locate.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/udf_locate.q.out Thu Apr 16 18:35:39 2015
@@ -64,9 +64,9 @@ STAGE PLANS:
           Row Limit Per Split: 1
           Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
           Select Operator
-            expressions: 1 (type: int), 0 (type: int), 2 (type: int), 2 (type: int), 4 (type: int), 4 (type: int), 0 (type: int), 0 (type: int), 2 (type: int), 3 (type: int), 4 (type: int), 2 (type: int), 3 (type: int), locate(null, 'abc') (type: int), locate('abc', null) (type: int), locate('abc', 'abcd', null) (type: int), 0 (type: int)
+            expressions: 1 (type: int), 0 (type: int), 2 (type: int), 2 (type: int), 4 (type: int), 4 (type: int), 0 (type: int), 0 (type: int), 2 (type: int), 3 (type: int), 4 (type: int), 2 (type: int), 3 (type: int), null (type: int), null (type: int), 0 (type: int), 0 (type: int)
             outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16
-            Statistics: Num rows: 500 Data size: 34000 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 500 Data size: 30000 Basic stats: COMPLETE Column stats: COMPLETE
             ListSink
 
 PREHOOK: query: SELECT locate('abc', 'abcd'),

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/udf_minute.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/udf_minute.q.out?rev=1674132&r1=1674131&r2=1674132&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/udf_minute.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/udf_minute.q.out Thu Apr 16 18:35:39 2015
@@ -39,7 +39,7 @@ STAGE PLANS:
               predicate: (UDFToDouble(key) = 86.0) (type: boolean)
               Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
               Select Operator
-                expressions: 14 (type: int), 14 (type: int), null (type: void)
+                expressions: 14 (type: int), 14 (type: int), null (type: int)
                 outputColumnNames: _col0, _col1, _col2
                 Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
                 File Output Operator

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/udf_nvl.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/udf_nvl.q.out?rev=1674132&r1=1674131&r2=1674132&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/udf_nvl.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/udf_nvl.q.out Thu Apr 16 18:35:39 2015
@@ -34,7 +34,7 @@ STAGE PLANS:
           Row Limit Per Split: 1
           Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
           Select Operator
-            expressions: 1 (type: int), if null is null returns5 (type: int)
+            expressions: 1 (type: int), 5 (type: int)
             outputColumnNames: _col0, _col1
             Statistics: Num rows: 500 Data size: 4000 Basic stats: COMPLETE Column stats: COMPLETE
             ListSink

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/udf_parse_url.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/udf_parse_url.q.out?rev=1674132&r1=1674131&r2=1674132&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/udf_parse_url.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/udf_parse_url.q.out Thu Apr 16 18:35:39 2015
@@ -60,7 +60,7 @@ STAGE PLANS:
               predicate: (UDFToDouble(key) = 86.0) (type: boolean)
               Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
               Select Operator
-                expressions: 'facebook.com' (type: string), '/path1/p.php' (type: string), 'k1=v1&k2=v2' (type: string), 'Ref1' (type: string), 'v2' (type: string), 'v1' (type: string), null (type: void), '/path1/p.php?k1=v1&k2=v2' (type: string), 'http' (type: string), null (type: void), 'facebook.com' (type: string)
+                expressions: 'facebook.com' (type: string), '/path1/p.php' (type: string), 'k1=v1&k2=v2' (type: string), 'Ref1' (type: string), 'v2' (type: string), 'v1' (type: string), null (type: string), '/path1/p.php?k1=v1&k2=v2' (type: string), 'http' (type: string), null (type: string), 'facebook.com' (type: string)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10
                 Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
                 File Output Operator

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/udf_second.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/udf_second.q.out?rev=1674132&r1=1674131&r2=1674132&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/udf_second.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/udf_second.q.out Thu Apr 16 18:35:39 2015
@@ -39,7 +39,7 @@ STAGE PLANS:
             predicate: (UDFToDouble(key) = 86.0) (type: boolean)
             Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
             Select Operator
-              expressions: 15 (type: int), 15 (type: int), null (type: void)
+              expressions: 15 (type: int), 15 (type: int), null (type: int)
               outputColumnNames: _col0, _col1, _col2
               Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
               ListSink

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/udf_size.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/udf_size.q.out?rev=1674132&r1=1674131&r2=1674132&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/udf_size.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/udf_size.q.out Thu Apr 16 18:35:39 2015
@@ -41,7 +41,7 @@ STAGE PLANS:
             predicate: (lint is not null and (not mstringstring is null)) (type: boolean)
             Statistics: Num rows: 3 Data size: 837 Basic stats: COMPLETE Column stats: NONE
             Select Operator
-              expressions: size(lint) (type: int), size(lintstring) (type: int), size(mstringstring) (type: int), size(null) (type: int)
+              expressions: size(lint) (type: int), size(lintstring) (type: int), size(mstringstring) (type: int), -1 (type: int)
               outputColumnNames: _col0, _col1, _col2, _col3
               Statistics: Num rows: 3 Data size: 837 Basic stats: COMPLETE Column stats: NONE
               Limit

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/udf_trunc.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/udf_trunc.q.out?rev=1674132&r1=1674131&r2=1674132&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/udf_trunc.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/udf_trunc.q.out Thu Apr 16 18:35:39 2015
@@ -567,34 +567,22 @@ SELECT
       TRUNC('2014-01-01', CAST(null AS STRING))
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
-  Stage-1 is a root stage
-  Stage-0 depends on stages: Stage-1
+  Stage-0 is a root stage
 
 STAGE PLANS:
-  Stage: Stage-1
-    Map Reduce
-      Map Operator Tree:
-          TableScan
-            alias: _dummy_table
-            Row Limit Per Split: 1
-            Statistics: Num rows: 0 Data size: 1 Basic stats: PARTIAL Column stats: COMPLETE
-            Select Operator
-              expressions: '2014-02-01' (type: string), trunc(UDFToString(null), 'MM') (type: string), trunc(CAST( null AS DATE), 'MM') (type: string), trunc(CAST( null AS TIMESTAMP), 'MM') (type: string), null (type: void), trunc('2014-01-01', UDFToString(null)) (type: string)
-              outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-              Statistics: Num rows: 0 Data size: 1 Basic stats: PARTIAL Column stats: COMPLETE
-              File Output Operator
-                compressed: false
-                Statistics: Num rows: 0 Data size: 1 Basic stats: PARTIAL Column stats: COMPLETE
-                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
-
   Stage: Stage-0
     Fetch Operator
       limit: -1
       Processor Tree:
-        ListSink
+        TableScan
+          alias: _dummy_table
+          Row Limit Per Split: 1
+          Statistics: Num rows: 0 Data size: 1 Basic stats: PARTIAL Column stats: COMPLETE
+          Select Operator
+            expressions: '2014-02-01' (type: string), null (type: string), null (type: string), null (type: string), null (type: string), null (type: string)
+            outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
+            Statistics: Num rows: 0 Data size: 1 Basic stats: PARTIAL Column stats: COMPLETE
+            ListSink
 
 PREHOOK: query: SELECT
       TRUNC('2014-01-34', 'MM'),
@@ -638,34 +626,22 @@ SELECT
       TRUNC('2014-01-01', CAST(null AS STRING))
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
-  Stage-1 is a root stage
-  Stage-0 depends on stages: Stage-1
+  Stage-0 is a root stage
 
 STAGE PLANS:
-  Stage: Stage-1
-    Map Reduce
-      Map Operator Tree:
-          TableScan
-            alias: _dummy_table
-            Row Limit Per Split: 1
-            Statistics: Num rows: 0 Data size: 1 Basic stats: PARTIAL Column stats: COMPLETE
-            Select Operator
-              expressions: '2014-01-01' (type: string), trunc(UDFToString(null), 'YEAR') (type: string), trunc(CAST( null AS DATE), 'YEAR') (type: string), trunc(CAST( null AS TIMESTAMP), 'YEAR') (type: string), null (type: void), trunc('2014-01-01', UDFToString(null)) (type: string)
-              outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-              Statistics: Num rows: 0 Data size: 1 Basic stats: PARTIAL Column stats: COMPLETE
-              File Output Operator
-                compressed: false
-                Statistics: Num rows: 0 Data size: 1 Basic stats: PARTIAL Column stats: COMPLETE
-                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
-
   Stage: Stage-0
     Fetch Operator
       limit: -1
       Processor Tree:
-        ListSink
+        TableScan
+          alias: _dummy_table
+          Row Limit Per Split: 1
+          Statistics: Num rows: 0 Data size: 1 Basic stats: PARTIAL Column stats: COMPLETE
+          Select Operator
+            expressions: '2014-01-01' (type: string), null (type: string), null (type: string), null (type: string), null (type: string), null (type: string)
+            outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
+            Statistics: Num rows: 0 Data size: 1 Basic stats: PARTIAL Column stats: COMPLETE
+            ListSink
 
 PREHOOK: query: SELECT
       TRUNC('2014-01-34', 'YEAR'),

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/udf_when.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/udf_when.q.out?rev=1674132&r1=1674131&r2=1674132&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/udf_when.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/udf_when.q.out Thu Apr 16 18:35:39 2015
@@ -89,9 +89,9 @@ STAGE PLANS:
           Row Limit Per Split: 1
           Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
           Select Operator
-            expressions: 2 (type: int), 9 (type: int), 14 (type: int), null (type: void), CASE WHEN (false) THEN (null) WHEN (true) THEN (24) END (type: int), CASE WHEN (false) THEN (27) WHEN (true) THEN (null) END (type: int)
+            expressions: 2 (type: int), 9 (type: int), 14 (type: int), null (type: int), 24 (type: int), null (type: int)
             outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-            Statistics: Num rows: 500 Data size: 10000 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 500 Data size: 8000 Basic stats: COMPLETE Column stats: COMPLETE
             ListSink
 
 PREHOOK: query: SELECT CASE

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/union30.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/union30.q.out?rev=1674132&r1=1674131&r2=1674132&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/union30.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/union30.q.out Thu Apr 16 18:35:39 2015
@@ -117,27 +117,6 @@ STAGE PLANS:
                         serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
                         name: default.union_subq_union
           TableScan
-            alias: src
-            Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
-            Select Operator
-              expressions: key (type: string), value (type: string)
-              outputColumnNames: _col0, _col1
-              Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
-              Union
-                Statistics: Num rows: 1500 Data size: 15936 Basic stats: COMPLETE Column stats: NONE
-                Select Operator
-                  expressions: UDFToInteger(_col0) (type: int), _col1 (type: string)
-                  outputColumnNames: _col0, _col1
-                  Statistics: Num rows: 1500 Data size: 15936 Basic stats: COMPLETE Column stats: NONE
-                  File Output Operator
-                    compressed: false
-                    Statistics: Num rows: 1500 Data size: 15936 Basic stats: COMPLETE Column stats: NONE
-                    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.union_subq_union
-          TableScan
             Union
               Statistics: Num rows: 1500 Data size: 15936 Basic stats: COMPLETE Column stats: NONE
               Select Operator
@@ -167,6 +146,27 @@ STAGE PLANS:
                       output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                       serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
                       name: default.union_subq_union
+          TableScan
+            alias: src
+            Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
+            Select Operator
+              expressions: key (type: string), value (type: string)
+              outputColumnNames: _col0, _col1
+              Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
+              Union
+                Statistics: Num rows: 1500 Data size: 15936 Basic stats: COMPLETE Column stats: NONE
+                Select Operator
+                  expressions: UDFToInteger(_col0) (type: int), _col1 (type: string)
+                  outputColumnNames: _col0, _col1
+                  Statistics: Num rows: 1500 Data size: 15936 Basic stats: COMPLETE Column stats: NONE
+                  File Output Operator
+                    compressed: false
+                    Statistics: Num rows: 1500 Data size: 15936 Basic stats: COMPLETE Column stats: NONE
+                    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.union_subq_union
 
   Stage: Stage-8
     Conditional Operator

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/union_lateralview.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/union_lateralview.q.out?rev=1674132&r1=1674131&r2=1674132&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/union_lateralview.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/union_lateralview.q.out Thu Apr 16 18:35:39 2015
@@ -102,14 +102,6 @@ STAGE PLANS:
                             Statistics: Num rows: 2000 Data size: 21248 Basic stats: COMPLETE Column stats: NONE
                             value expressions: _col0 (type: int), _col2 (type: string)
           TableScan
-            alias: b
-            Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
-            Reduce Output Operator
-              key expressions: key (type: string)
-              sort order: +
-              Map-reduce partition columns: key (type: string)
-              Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
-          TableScan
             alias: srcpart
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Select Operator
@@ -157,6 +149,14 @@ STAGE PLANS:
                             Map-reduce partition columns: _col1 (type: string)
                             Statistics: Num rows: 2000 Data size: 21248 Basic stats: COMPLETE Column stats: NONE
                             value expressions: _col0 (type: int), _col2 (type: string)
+          TableScan
+            alias: b
+            Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
+            Reduce Output Operator
+              key expressions: key (type: string)
+              sort order: +
+              Map-reduce partition columns: key (type: string)
+              Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
       Reduce Operator Tree:
         Join Operator
           condition map:

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/union_view.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/union_view.q.out?rev=1674132&r1=1674131&r2=1674132&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/union_view.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/union_view.q.out Thu Apr 16 18:35:39 2015
@@ -503,6 +503,54 @@ STAGE PLANS:
                           input format: org.apache.hadoop.mapred.TextInputFormat
                           output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                           serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+          TableScan
+            alias: src_union_2
+            filterExpr: ((key = 86) and (ds = '1')) (type: boolean)
+            Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+            Filter Operator
+              predicate: ((key = 86) and (ds = '1')) (type: boolean)
+              Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+              Select Operator
+                expressions: value (type: string)
+                outputColumnNames: _col1
+                Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+                Union
+                  Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
+                  Select Operator
+                    expressions: 86 (type: int), _col1 (type: string), '1' (type: string)
+                    outputColumnNames: _col0, _col1, _col2
+                    Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
+                    File Output Operator
+                      compressed: false
+                      Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
+                      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
+          TableScan
+            alias: src_union_3
+            filterExpr: ((key = 86) and (ds = '1')) (type: boolean)
+            Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+            Filter Operator
+              predicate: ((key = 86) and (ds = '1')) (type: boolean)
+              Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+              Select Operator
+                expressions: value (type: string)
+                outputColumnNames: _col1
+                Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+                Union
+                  Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
+                  Select Operator
+                    expressions: 86 (type: int), _col1 (type: string), '1' (type: string)
+                    outputColumnNames: _col0, _col1, _col2
+                    Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
+                    File Output Operator
+                      compressed: false
+                      Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
+                      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
 
   Stage: Stage-0
     Fetch Operator
@@ -571,6 +619,30 @@ STAGE PLANS:
                       Statistics: Num rows: 1250 Data size: 13280 Basic stats: COMPLETE Column stats: NONE
                       value expressions: _col1 (type: string)
           TableScan
+            alias: src_union_1
+            filterExpr: ((key = 86) and (ds = '2')) (type: boolean)
+            Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+            Filter Operator
+              predicate: ((key = 86) and (ds = '2')) (type: boolean)
+              Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+              Select Operator
+                expressions: value (type: string)
+                outputColumnNames: _col1
+                Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+                Union
+                  Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
+                  Select Operator
+                    expressions: 86 (type: int), _col1 (type: string), '2' (type: string)
+                    outputColumnNames: _col0, _col1, _col2
+                    Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
+                    File Output Operator
+                      compressed: false
+                      Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
+                      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
+          TableScan
             alias: src_union_2
             filterExpr: ((key = 86) and ds is not null) (type: boolean)
             Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE
@@ -965,6 +1037,30 @@ STAGE PLANS:
                           input format: org.apache.hadoop.mapred.TextInputFormat
                           output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                           serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+          TableScan
+            alias: src_union_3
+            filterExpr: ((key = 86) and (ds = '2')) (type: boolean)
+            Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+            Filter Operator
+              predicate: ((key = 86) and (ds = '2')) (type: boolean)
+              Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+              Select Operator
+                expressions: value (type: string)
+                outputColumnNames: _col1
+                Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+                Union
+                  Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
+                  Select Operator
+                    expressions: 86 (type: int), _col1 (type: string), '2' (type: string)
+                    outputColumnNames: _col0, _col1, _col2
+                    Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
+                    File Output Operator
+                      compressed: false
+                      Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
+                      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
 
   Stage: Stage-0
     Fetch Operator
@@ -1006,6 +1102,54 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
+            alias: src_union_1
+            filterExpr: ((key = 86) and (ds = '3')) (type: boolean)
+            Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+            Filter Operator
+              predicate: ((key = 86) and (ds = '3')) (type: boolean)
+              Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+              Select Operator
+                expressions: value (type: string)
+                outputColumnNames: _col1
+                Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+                Union
+                  Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
+                  Select Operator
+                    expressions: 86 (type: int), _col1 (type: string), '3' (type: string)
+                    outputColumnNames: _col0, _col1, _col2
+                    Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
+                    File Output Operator
+                      compressed: false
+                      Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
+                      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
+          TableScan
+            alias: src_union_2
+            filterExpr: ((key = 86) and (ds = '3')) (type: boolean)
+            Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+            Filter Operator
+              predicate: ((key = 86) and (ds = '3')) (type: boolean)
+              Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+              Select Operator
+                expressions: value (type: string)
+                outputColumnNames: _col1
+                Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+                Union
+                  Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
+                  Select Operator
+                    expressions: 86 (type: int), _col1 (type: string), '3' (type: string)
+                    outputColumnNames: _col0, _col1, _col2
+                    Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
+                    File Output Operator
+                      compressed: false
+                      Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
+                      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
+          TableScan
             alias: src_union_3
             filterExpr: (ds = '4') (type: boolean)
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
@@ -1024,6 +1168,72 @@ STAGE PLANS:
                       sort order: 
                       Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
                       value expressions: _col0 (type: bigint)
+          TableScan
+            alias: src_union_2
+            filterExpr: (ds = '1') (type: boolean)
+            Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+            Filter Operator
+              predicate: (ds = '1') (type: boolean)
+              Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+              Select Operator
+                Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+                Union
+                  Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
+                  Select Operator
+                    Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
+                    Group By Operator
+                      aggregations: count(1)
+                      mode: hash
+                      outputColumnNames: _col0
+                      Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                      Reduce Output Operator
+                        sort order: 
+                        Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                        value expressions: _col0 (type: bigint)
+          TableScan
+            alias: src_union_3
+            filterExpr: (ds = '1') (type: boolean)
+            Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+            Filter Operator
+              predicate: (ds = '1') (type: boolean)
+              Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+              Select Operator
+                Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+                Union
+                  Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
+                  Select Operator
+                    Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
+                    Group By Operator
+                      aggregations: count(1)
+                      mode: hash
+                      outputColumnNames: _col0
+                      Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                      Reduce Output Operator
+                        sort order: 
+                        Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                        value expressions: _col0 (type: bigint)
+          TableScan
+            alias: src_union_3
+            filterExpr: (ds = '2') (type: boolean)
+            Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+            Filter Operator
+              predicate: (ds = '2') (type: boolean)
+              Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+              Select Operator
+                Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+                Union
+                  Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE
+                  Select Operator
+                    Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE
+                    Group By Operator
+                      aggregations: count(1)
+                      mode: hash
+                      outputColumnNames: _col0
+                      Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                      Reduce Output Operator
+                        sort order: 
+                        Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                        value expressions: _col0 (type: bigint)
       Reduce Operator Tree:
         Group By Operator
           aggregations: count(VALUE._col0)

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/vector_coalesce.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/vector_coalesce.q.out?rev=1674132&r1=1674131&r2=1674132&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/vector_coalesce.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/vector_coalesce.q.out Thu Apr 16 18:35:39 2015
@@ -87,7 +87,7 @@ STAGE PLANS:
               predicate: ctinyint is null (type: boolean)
               Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE
               Select Operator
-                expressions: null (type: void), cdouble (type: double), cint (type: int), COALESCE((UDFToInteger(null) + 10),(cdouble + log2(cint)),0) (type: double)
+                expressions: null (type: void), cdouble (type: double), cint (type: int), COALESCE(null,(cdouble + log2(cint)),0) (type: double)
                 outputColumnNames: _col0, _col1, _col2, _col3
                 Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE
                 Limit
@@ -153,7 +153,7 @@ STAGE PLANS:
               predicate: (cfloat is null and cbigint is null) (type: boolean)
               Statistics: Num rows: 3072 Data size: 660491 Basic stats: COMPLETE Column stats: NONE
               Select Operator
-                expressions: null (type: void), null (type: void), COALESCE(null,null,0) (type: float)
+                expressions: null (type: void), null (type: void), 0 (type: int)
                 outputColumnNames: _col0, _col1, _col2
                 Statistics: Num rows: 3072 Data size: 660491 Basic stats: COMPLETE Column stats: NONE
                 Limit

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/vector_decimal_udf.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/vector_decimal_udf.q.out?rev=1674132&r1=1674131&r2=1674132&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/vector_decimal_udf.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/vector_decimal_udf.q.out Thu Apr 16 18:35:39 2015
@@ -1146,7 +1146,7 @@ STAGE PLANS:
             alias: decimal_udf
             Statistics: Num rows: 38 Data size: 4296 Basic stats: COMPLETE Column stats: NONE
             Select Operator
-              expressions: (UDFToDouble(key) / UDFToDouble(null)) (type: double)
+              expressions: (UDFToDouble(key) / null) (type: double)
               outputColumnNames: _col0
               Statistics: Num rows: 38 Data size: 4296 Basic stats: COMPLETE Column stats: NONE
               Limit
@@ -1159,7 +1159,6 @@ STAGE PLANS:
                       input format: org.apache.hadoop.mapred.TextInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                       serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-      Execution mode: vectorized
 
   Stage: Stage-0
     Fetch Operator

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/vector_elt.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/vector_elt.q.out?rev=1674132&r1=1674131&r2=1674132&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/vector_elt.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/vector_elt.q.out Thu Apr 16 18:35:39 2015
@@ -102,7 +102,7 @@ STAGE PLANS:
           alias: alltypesorc
           Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: COMPLETE
           Select Operator
-            expressions: 'defg' (type: string), 'cc' (type: string), 'abc' (type: string), '2' (type: string), '12345' (type: string), '123456789012' (type: string), '1.25' (type: string), '16.0' (type: string), null (type: void), null (type: void)
+            expressions: 'defg' (type: string), 'cc' (type: string), 'abc' (type: string), '2' (type: string), '12345' (type: string), '123456789012' (type: string), '1.25' (type: string), '16.0' (type: string), null (type: string), null (type: string)
             outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9
             Statistics: Num rows: 12288 Data size: 8687616 Basic stats: COMPLETE Column stats: COMPLETE
             Limit

Modified: hive/branches/cbo/service/src/java/org/apache/hive/service/auth/HttpAuthUtils.java
URL: http://svn.apache.org/viewvc/hive/branches/cbo/service/src/java/org/apache/hive/service/auth/HttpAuthUtils.java?rev=1674132&r1=1674131&r2=1674132&view=diff
==============================================================================
--- hive/branches/cbo/service/src/java/org/apache/hive/service/auth/HttpAuthUtils.java (original)
+++ hive/branches/cbo/service/src/java/org/apache/hive/service/auth/HttpAuthUtils.java Thu Apr 16 18:35:39 2015
@@ -21,10 +21,19 @@ package org.apache.hive.service.auth;
 import java.security.AccessControlContext;
 import java.security.AccessController;
 import java.security.PrivilegedExceptionAction;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Random;
+import java.util.Set;
+import java.util.StringTokenizer;
 
 import javax.security.auth.Subject;
 
 import org.apache.commons.codec.binary.Base64;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hive.shims.ShimLoader;
 import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.http.protocol.BasicHttpContext;
@@ -42,6 +51,13 @@ public final class HttpAuthUtils {
   public static final String AUTHORIZATION = "Authorization";
   public static final String BASIC = "Basic";
   public static final String NEGOTIATE = "Negotiate";
+  private static final Log LOG = LogFactory.getLog(HttpAuthUtils.class);
+  private static final String COOKIE_ATTR_SEPARATOR = "&";
+  private static final String COOKIE_CLIENT_USER_NAME = "cu";
+  private static final String COOKIE_CLIENT_RAND_NUMBER = "rn";
+  private static final String COOKIE_KEY_VALUE_SEPARATOR = "=";
+  private final static Set<String> COOKIE_ATTRIBUTES =
+    new HashSet<String>(Arrays.asList(COOKIE_CLIENT_USER_NAME, COOKIE_CLIENT_RAND_NUMBER));
 
   /**
    * @return Stringified Base64 encoded kerberosAuthHeader on success
@@ -68,6 +84,62 @@ public final class HttpAuthUtils {
     }
   }
 
+  /**
+   * Creates and returns a HS2 cookie token.
+   * @param clientUserName Client User name.
+   * @return An unsigned cookie token generated from input parameters.
+   * The final cookie generated is of the following format :
+   * cu=<username>&rn=<randomNumber>&s=<cookieSignature>
+   */
+  public static String createCookieToken(String clientUserName) {
+    StringBuffer sb = new StringBuffer();
+    sb.append(COOKIE_CLIENT_USER_NAME).append(COOKIE_KEY_VALUE_SEPARATOR).append(clientUserName).
+    append(COOKIE_ATTR_SEPARATOR);
+    sb.append(COOKIE_CLIENT_RAND_NUMBER).append(COOKIE_KEY_VALUE_SEPARATOR).
+    append((new Random(System.currentTimeMillis())).nextLong());
+    return sb.toString();
+  }
+
+  /**
+   * Parses a cookie token to retrieve client user name.
+   * @param tokenStr Token String.
+   * @return A valid user name if input is of valid format, else returns null.
+   */
+  public static String getUserNameFromCookieToken(String tokenStr) {
+    Map<String, String> map = splitCookieToken(tokenStr);
+
+    if (!map.keySet().equals(COOKIE_ATTRIBUTES)) {
+      LOG.error("Invalid token with missing attributes " + tokenStr);
+      return null;
+    }
+    return map.get(COOKIE_CLIENT_USER_NAME);
+  }
+
+  /**
+   * Splits the cookie token into attributes pairs.
+   * @param str input token.
+   * @return a map with the attribute pairs of the token if the input is valid.
+   * Else, returns null.
+   */
+  private static Map<String, String> splitCookieToken(String tokenStr) {
+    Map<String, String> map = new HashMap<String, String>();
+    StringTokenizer st = new StringTokenizer(tokenStr, COOKIE_ATTR_SEPARATOR);
+
+    while (st.hasMoreTokens()) {
+      String part = st.nextToken();
+      int separator = part.indexOf(COOKIE_KEY_VALUE_SEPARATOR);
+      if (separator == -1) {
+        LOG.error("Invalid token string " + tokenStr);
+        return null;
+      }
+      String key = part.substring(0, separator);
+      String value = part.substring(separator + 1);
+      map.put(key, value);
+    }
+    return map;
+  }
+
+
   private HttpAuthUtils() {
     throw new UnsupportedOperationException("Can't initialize class");
   }



Mime
View raw message