hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jimmy Xiang" <jxi...@cloudera.com>
Subject Re: Review Request 33128: HIVE-10313:Literal Decimal ExprNodeConstantDesc should contain value of HiveDecimal instead of String
Date Wed, 15 Apr 2015 22:26:32 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33128/#review80273
-----------------------------------------------------------



ql/src/test/results/clientpositive/literal_decimal.q.out
<https://reviews.apache.org/r/33128/#comment130082>

    Why does the output changed to null?


- Jimmy Xiang


On April 13, 2015, 4:51 p.m., Chaoyu Tang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33128/
> -----------------------------------------------------------
> 
> (Updated April 13, 2015, 4:51 p.m.)
> 
> 
> Review request for hive, Ashutosh Chauhan, Szehon Ho, and Xuefu Zhang.
> 
> 
> Bugs: HIVE-10313
>     https://issues.apache.org/jira/browse/HIVE-10313
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> In TyepCheckProcFactory.NumExprProcessor, the ExprNodeConstantDesc is currently 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 shoudl be created from HiveDecimal hd instread.
> 
> 
> Diffs
> -----
> 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/TypeCheckProcFactory.java 79d38bc 
>   ql/src/test/results/clientpositive/literal_decimal.q.out b2a23cf 
>   ql/src/test/results/clientpositive/tez/vector_decimal_2.q.out e67ab7b 
>   ql/src/test/results/clientpositive/vector_decimal_2.q.out b22d00c 
> 
> Diff: https://reviews.apache.org/r/33128/diff/
> 
> 
> Testing
> -------
> 
> Manually tests
> kick off precommit build tests
> 
> 
> Thanks,
> 
> Chaoyu Tang
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message