hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject svn commit: r1644800 - in /hive/trunk/ql/src: java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/RexNodeConverter.java test/results/clientpositive/ql_rewrite_gbtoidx_cbo_1.q.out test/results/clientpositive/ql_rewrite_gbtoidx_cbo_2.q.out
Date Fri, 12 Dec 2014 00:41:06 GMT
Author: hashutosh
Date: Fri Dec 12 00:41:05 2014
New Revision: 1644800

URL: http://svn.apache.org/r1644800
Log:
HIVE-9034 : CBO: type change in literal_ints.q (Sergey Shelukhin via Ashutosh Chauhan)

Modified:
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/RexNodeConverter.java
    hive/trunk/ql/src/test/results/clientpositive/ql_rewrite_gbtoidx_cbo_1.q.out
    hive/trunk/ql/src/test/results/clientpositive/ql_rewrite_gbtoidx_cbo_2.q.out

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/RexNodeConverter.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/RexNodeConverter.java?rev=1644800&r1=1644799&r2=1644800&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/RexNodeConverter.java
(original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/RexNodeConverter.java
Fri Dec 12 00:41:05 2014
@@ -309,9 +309,7 @@ public class RexNodeConverter {
       calciteLiteral = rexBuilder.makeLiteral(((Boolean) value).booleanValue());
       break;
     case BYTE:
-      byte[] byteArray = new byte[] { (Byte) value };
-      ByteString bs = new ByteString(byteArray);
-      calciteLiteral = rexBuilder.makeBinaryLiteral(bs);
+      calciteLiteral = rexBuilder.makeExactLiteral(new BigDecimal((Byte) value), calciteDataType);
       break;
     case SHORT:
       calciteLiteral = rexBuilder.makeExactLiteral(new BigDecimal((Short) value), calciteDataType);

Modified: hive/trunk/ql/src/test/results/clientpositive/ql_rewrite_gbtoidx_cbo_1.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/ql_rewrite_gbtoidx_cbo_1.q.out?rev=1644800&r1=1644799&r2=1644800&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/ql_rewrite_gbtoidx_cbo_1.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/ql_rewrite_gbtoidx_cbo_1.q.out Fri Dec 12
00:41:05 2014
@@ -459,7 +459,7 @@ STAGE PLANS:
           keys: KEY._col0 (type: int), KEY._col1 (type: int)
           mode: mergepartial
           outputColumnNames: _col0, _col1, _col2
-          Statistics: Num rows: 120 Data size: 12099 Basic stats: COMPLETE Column stats:
NONE
+          Statistics: Num rows: 60 Data size: 6049 Basic stats: COMPLETE Column stats: NONE
           File Output Operator
             compressed: false
             table:
@@ -474,16 +474,16 @@ STAGE PLANS:
             Reduce Output Operator
               key expressions: _col0 (type: int), _col1 (type: int)
               sort order: ++
-              Statistics: Num rows: 120 Data size: 12099 Basic stats: COMPLETE Column stats:
NONE
+              Statistics: Num rows: 60 Data size: 6049 Basic stats: COMPLETE Column stats:
NONE
               value expressions: _col2 (type: bigint)
       Reduce Operator Tree:
         Select Operator
           expressions: KEY.reducesinkkey0 (type: int), KEY.reducesinkkey1 (type: int), VALUE._col0
(type: bigint)
           outputColumnNames: _col0, _col1, _col2
-          Statistics: Num rows: 120 Data size: 12099 Basic stats: COMPLETE Column stats:
NONE
+          Statistics: Num rows: 60 Data size: 6049 Basic stats: COMPLETE Column stats: NONE
           File Output Operator
             compressed: false
-            Statistics: Num rows: 120 Data size: 12099 Basic stats: COMPLETE Column stats:
NONE
+            Statistics: Num rows: 60 Data size: 6049 Basic stats: COMPLETE Column stats:
NONE
             table:
                 input format: org.apache.hadoop.mapred.TextInputFormat
                 output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
@@ -604,7 +604,7 @@ STAGE PLANS:
           keys: KEY._col0 (type: int), KEY._col1 (type: int)
           mode: mergepartial
           outputColumnNames: _col0, _col1, _col2
-          Statistics: Num rows: 95 Data size: 8960 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 47 Data size: 4432 Basic stats: COMPLETE Column stats: NONE
           File Output Operator
             compressed: false
             table:
@@ -619,16 +619,16 @@ STAGE PLANS:
             Reduce Output Operator
               key expressions: _col0 (type: int), _col1 (type: int)
               sort order: ++
-              Statistics: Num rows: 95 Data size: 8960 Basic stats: COMPLETE Column stats:
NONE
+              Statistics: Num rows: 47 Data size: 4432 Basic stats: COMPLETE Column stats:
NONE
               value expressions: _col2 (type: bigint)
       Reduce Operator Tree:
         Select Operator
           expressions: KEY.reducesinkkey0 (type: int), KEY.reducesinkkey1 (type: int), VALUE._col0
(type: bigint)
           outputColumnNames: _col0, _col1, _col2
-          Statistics: Num rows: 95 Data size: 8960 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 47 Data size: 4432 Basic stats: COMPLETE Column stats: NONE
           File Output Operator
             compressed: false
-            Statistics: Num rows: 95 Data size: 8960 Basic stats: COMPLETE Column stats:
NONE
+            Statistics: Num rows: 47 Data size: 4432 Basic stats: COMPLETE Column stats:
NONE
             table:
                 input format: org.apache.hadoop.mapred.TextInputFormat
                 output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
@@ -768,15 +768,15 @@ STAGE PLANS:
                   keys: year(l_shipdate) (type: int), month(l_shipdate) (type: int)
                   mode: hash
                   outputColumnNames: _col0, _col1, _col2
-                  Statistics: Num rows: 23 Data size: 2168 Basic stats: COMPLETE Column stats:
NONE
+                  Statistics: Num rows: 47 Data size: 4432 Basic stats: COMPLETE Column stats:
NONE
                   Filter Operator
                     predicate: _col1 is not null (type: boolean)
-                    Statistics: Num rows: 12 Data size: 1131 Basic stats: COMPLETE Column
stats: NONE
+                    Statistics: Num rows: 24 Data size: 2263 Basic stats: COMPLETE Column
stats: NONE
                     Reduce Output Operator
                       key expressions: _col0 (type: int), _col1 (type: int)
                       sort order: ++
                       Map-reduce partition columns: _col0 (type: int), _col1 (type: int)
-                      Statistics: Num rows: 12 Data size: 1131 Basic stats: COMPLETE Column
stats: NONE
+                      Statistics: Num rows: 24 Data size: 2263 Basic stats: COMPLETE Column
stats: NONE
                       value expressions: _col2 (type: bigint)
       Reduce Operator Tree:
         Group By Operator
@@ -784,11 +784,11 @@ STAGE PLANS:
           keys: KEY._col0 (type: int), KEY._col1 (type: int)
           mode: mergepartial
           outputColumnNames: _col0, _col1, _col2
-          Statistics: Num rows: 6 Data size: 565 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 12 Data size: 1131 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: _col1 (type: int), _col2 (type: bigint)
             outputColumnNames: _col1, _col2
-            Statistics: Num rows: 6 Data size: 565 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 12 Data size: 1131 Basic stats: COMPLETE Column stats:
NONE
             File Output Operator
               compressed: false
               table:
@@ -804,31 +804,31 @@ STAGE PLANS:
               key expressions: _col1 (type: int)
               sort order: +
               Map-reduce partition columns: _col1 (type: int)
-              Statistics: Num rows: 6 Data size: 565 Basic stats: COMPLETE Column stats:
NONE
+              Statistics: Num rows: 12 Data size: 1131 Basic stats: COMPLETE Column stats:
NONE
               value expressions: _col2 (type: bigint)
           TableScan
             Reduce Output Operator
               key expressions: _col1 (type: int)
               sort order: +
               Map-reduce partition columns: _col1 (type: int)
-              Statistics: Num rows: 6 Data size: 565 Basic stats: COMPLETE Column stats:
NONE
+              Statistics: Num rows: 12 Data size: 1131 Basic stats: COMPLETE Column stats:
NONE
               value expressions: _col2 (type: bigint)
       Reduce Operator Tree:
         Join Operator
           condition map:
                Inner Join 0 to 1
-          condition expressions:
-            0 {KEY.reducesinkkey0} {VALUE._col1}
-            1 {KEY.reducesinkkey0} {VALUE._col1}
+          keys:
+            0 _col1 (type: int)
+            1 _col1 (type: int)
           outputColumnNames: _col1, _col2, _col4, _col5
-          Statistics: Num rows: 6 Data size: 621 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 13 Data size: 1244 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: _col1 (type: int), _col4 (type: int), ((_col5 - _col2) / _col2)
(type: double)
             outputColumnNames: _col0, _col1, _col2
-            Statistics: Num rows: 6 Data size: 621 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 13 Data size: 1244 Basic stats: COMPLETE Column stats:
NONE
             File Output Operator
               compressed: false
-              Statistics: Num rows: 6 Data size: 621 Basic stats: COMPLETE Column stats:
NONE
+              Statistics: Num rows: 13 Data size: 1244 Basic stats: COMPLETE Column stats:
NONE
               table:
                   input format: org.apache.hadoop.mapred.TextInputFormat
                   output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
@@ -852,15 +852,15 @@ STAGE PLANS:
                   keys: year(l_shipdate) (type: int), month(l_shipdate) (type: int)
                   mode: hash
                   outputColumnNames: _col0, _col1, _col2
-                  Statistics: Num rows: 23 Data size: 2168 Basic stats: COMPLETE Column stats:
NONE
+                  Statistics: Num rows: 47 Data size: 4432 Basic stats: COMPLETE Column stats:
NONE
                   Filter Operator
                     predicate: _col1 is not null (type: boolean)
-                    Statistics: Num rows: 12 Data size: 1131 Basic stats: COMPLETE Column
stats: NONE
+                    Statistics: Num rows: 24 Data size: 2263 Basic stats: COMPLETE Column
stats: NONE
                     Reduce Output Operator
                       key expressions: _col0 (type: int), _col1 (type: int)
                       sort order: ++
                       Map-reduce partition columns: _col0 (type: int), _col1 (type: int)
-                      Statistics: Num rows: 12 Data size: 1131 Basic stats: COMPLETE Column
stats: NONE
+                      Statistics: Num rows: 24 Data size: 2263 Basic stats: COMPLETE Column
stats: NONE
                       value expressions: _col2 (type: bigint)
       Reduce Operator Tree:
         Group By Operator
@@ -868,11 +868,11 @@ STAGE PLANS:
           keys: KEY._col0 (type: int), KEY._col1 (type: int)
           mode: mergepartial
           outputColumnNames: _col0, _col1, _col2
-          Statistics: Num rows: 6 Data size: 565 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 12 Data size: 1131 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: _col1 (type: int), _col2 (type: bigint)
             outputColumnNames: _col1, _col2
-            Statistics: Num rows: 6 Data size: 565 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 12 Data size: 1131 Basic stats: COMPLETE Column stats:
NONE
             File Output Operator
               compressed: false
               table:
@@ -2487,7 +2487,7 @@ STAGE PLANS:
           keys: KEY._col0 (type: int)
           mode: mergepartial
           outputColumnNames: _col0, _col1
-          Statistics: Num rows: 17 Data size: 70 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 8 Data size: 32 Basic stats: COMPLETE Column stats: NONE
           File Output Operator
             compressed: false
             table:
@@ -2502,16 +2502,16 @@ STAGE PLANS:
             Reduce Output Operator
               key expressions: _col0 (type: int)
               sort order: +
-              Statistics: Num rows: 17 Data size: 70 Basic stats: COMPLETE Column stats:
NONE
+              Statistics: Num rows: 8 Data size: 32 Basic stats: COMPLETE Column stats: NONE
               value expressions: _col1 (type: bigint)
       Reduce Operator Tree:
         Select Operator
           expressions: KEY.reducesinkkey0 (type: int), VALUE._col0 (type: bigint)
           outputColumnNames: _col0, _col1
-          Statistics: Num rows: 17 Data size: 70 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 8 Data size: 32 Basic stats: COMPLETE Column stats: NONE
           File Output Operator
             compressed: false
-            Statistics: Num rows: 17 Data size: 70 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 8 Data size: 32 Basic stats: COMPLETE Column stats: NONE
             table:
                 input format: org.apache.hadoop.mapred.TextInputFormat
                 output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
@@ -2575,7 +2575,7 @@ STAGE PLANS:
           keys: KEY._col0 (type: int)
           mode: mergepartial
           outputColumnNames: _col0, _col1
-          Statistics: Num rows: 6 Data size: 430 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 3 Data size: 215 Basic stats: COMPLETE Column stats: NONE
           File Output Operator
             compressed: false
             table:
@@ -2590,16 +2590,16 @@ STAGE PLANS:
             Reduce Output Operator
               key expressions: _col0 (type: int)
               sort order: +
-              Statistics: Num rows: 6 Data size: 430 Basic stats: COMPLETE Column stats:
NONE
+              Statistics: Num rows: 3 Data size: 215 Basic stats: COMPLETE Column stats:
NONE
               value expressions: _col1 (type: bigint)
       Reduce Operator Tree:
         Select Operator
           expressions: KEY.reducesinkkey0 (type: int), VALUE._col0 (type: bigint)
           outputColumnNames: _col0, _col1
-          Statistics: Num rows: 6 Data size: 430 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 3 Data size: 215 Basic stats: COMPLETE Column stats: NONE
           File Output Operator
             compressed: false
-            Statistics: Num rows: 6 Data size: 430 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 3 Data size: 215 Basic stats: COMPLETE Column stats: NONE
             table:
                 input format: org.apache.hadoop.mapred.TextInputFormat
                 output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat

Modified: hive/trunk/ql/src/test/results/clientpositive/ql_rewrite_gbtoidx_cbo_2.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/ql_rewrite_gbtoidx_cbo_2.q.out?rev=1644800&r1=1644799&r2=1644800&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/ql_rewrite_gbtoidx_cbo_2.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/ql_rewrite_gbtoidx_cbo_2.q.out Fri Dec 12
00:41:05 2014
@@ -2205,9 +2205,9 @@ STAGE PLANS:
         Join Operator
           condition map:
                Inner Join 0 to 1
-          condition expressions:
-            0 {VALUE._col0} {KEY.reducesinkkey0}
-            1 {VALUE._col0} {KEY.reducesinkkey0}
+          keys:
+            0 _col1 (type: bigint)
+            1 _col1 (type: bigint)
           outputColumnNames: _col0, _col1, _col2, _col3
           Statistics: Num rows: 169 Data size: 12972 Basic stats: COMPLETE Column stats:
NONE
           Select Operator
@@ -2951,9 +2951,9 @@ STAGE PLANS:
         Join Operator
           condition map:
                Inner Join 0 to 1
-          condition expressions:
-            0 {VALUE._col0} {KEY.reducesinkkey0}
-            1 {VALUE._col0} {KEY.reducesinkkey0}
+          keys:
+            0 _col1 (type: bigint)
+            1 _col1 (type: bigint)
           outputColumnNames: _col0, _col1, _col2, _col3
           Statistics: Num rows: 56 Data size: 4295 Basic stats: COMPLETE Column stats: NONE
           Select Operator



Mime
View raw message