[
https://issues.apache.org/jira/browse/HIVE-10313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14492863#comment-14492863
]
Chaoyu Tang commented on HIVE-10313:
------------------------------------
The failure of test index_auto_mult_tables_compact.q looks not related to this
patch and I am not able to reproduce it. Also others from TestMinimrCliDriver
are also not related and they might be due to some build/infra issue.
> Literal Decimal ExprNodeConstantDesc should contain value of HiveDecimal
> instead of String
> ------------------------------------------------------------------------------------------
>
> Key: HIVE-10313
> URL: https://issues.apache.org/jira/browse/HIVE-10313
> Project: Hive
> Issue Type: Bug
> Components: Query Processor
> Affects Versions: 1.0.0
> Reporter: Chaoyu Tang
> Assignee: Chaoyu Tang
> Attachments: HIVE-10313.1.patch, HIVE-10313.patch
>
>
> In TyepCheckProcFactory.NumExprProcessor, the ExprNodeConstantDesc is created
> from strVal:
> {code}
> 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);
> }
> {code}
> It should use HiveDecmal:
> return new ExprNodeConstantDesc(typeInfo, hd);
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)