Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0.0
-
None
-
Reviewed
Description
In TyepCheckProcFactory.NumExprProcessor, the ExprNodeConstantDesc is created from strVal:
else if (expr.getText().endsWith("BD")) { // Literal decimal String strVal = expr.getText().substring(0, expr.getText().length() - 2); HiveDecimal hd = HiveDecimal.create(strVal); int prec = 1; int scale = 0; if (hd != null) { prec = hd.precision(); scale = hd.scale(); } DecimalTypeInfo typeInfo = TypeInfoFactory.getDecimalTypeInfo(prec, scale); return new ExprNodeConstantDesc(typeInfo, strVal); }
It should use HiveDecmal:
return new ExprNodeConstantDesc(typeInfo, hd);