hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From harisan...@apache.org
Subject hive git commit: CBO: Calcite Operator To Hive Operator (Calcite Return Path): ExprNodeConverter should use HiveDecimal to create Decimal (Pengcheng Xiong, reviewed by Jesus Camacho Rodriguez)
Date Wed, 05 Aug 2015 21:13:43 GMT
Repository: hive
Updated Branches:
  refs/heads/master ed648ab5a -> b91bf072b


CBO: Calcite Operator To Hive Operator (Calcite Return Path): ExprNodeConverter should use
HiveDecimal to create Decimal (Pengcheng Xiong, reviewed by Jesus Camacho Rodriguez)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/b91bf072
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/b91bf072
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/b91bf072

Branch: refs/heads/master
Commit: b91bf072bf17e6f069b8667fd79f58718d7a62ba
Parents: ed648ab
Author: Hari Subramaniyan <harisankar@apache.org>
Authored: Wed Aug 5 14:04:41 2015 -0700
Committer: Hari Subramaniyan <harisankar@apache.org>
Committed: Wed Aug 5 14:04:41 2015 -0700

----------------------------------------------------------------------
 .../hive/ql/optimizer/calcite/translator/ExprNodeConverter.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/b91bf072/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/ExprNodeConverter.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/ExprNodeConverter.java
b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/ExprNodeConverter.java
index 955aa91..b6a79db 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/ExprNodeConverter.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/ExprNodeConverter.java
@@ -44,6 +44,7 @@ import org.apache.calcite.sql.type.SqlTypeUtil;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hive.common.type.HiveChar;
+import org.apache.hadoop.hive.common.type.HiveDecimal;
 import org.apache.hadoop.hive.common.type.HiveIntervalDayTime;
 import org.apache.hadoop.hive.common.type.HiveIntervalYearMonth;
 import org.apache.hadoop.hive.common.type.HiveVarchar;
@@ -223,7 +224,7 @@ public class ExprNodeConverter extends RexVisitorImpl<ExprNodeDesc>
{
       return new ExprNodeConstantDesc(TypeInfoFactory.binaryTypeInfo, literal.getValue3());
     case DECIMAL:
       return new ExprNodeConstantDesc(TypeInfoFactory.getDecimalTypeInfo(lType.getPrecision(),
-          lType.getScale()), literal.getValue3());
+          lType.getScale()), HiveDecimal.create((BigDecimal)literal.getValue3()));
     case VARCHAR: {
       int varcharLength = lType.getPrecision();
       // If we cannot use Varchar due to type length restrictions, we use String


Mime
View raw message