Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive >> mail # dev >> Review Request 14674: HIVE-3976: Support specifying scale and precision with Hive decimal type


Copy link to this message
-
Re: Review Request 14674: HIVE-3976: Support specifying scale and precision with Hive decimal type

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

serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/WritableConstantHiveDecimalObjectInspector.java
<https://reviews.apache.org/r/14674/#comment52757>

    But the constructor doesn't need to return null, it just needs to set this.value to null.  Then getWritableConstantValue() can just return this.value, rather than having to convert to HiveDecimal and back to HiveDecimalWritable on every call to getWritableConstantValue().
- Jason Dere
On Oct. 16, 2013, 5:06 p.m., Xuefu Zhang wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/14674/
> -----------------------------------------------------------
>
> (Updated Oct. 16, 2013, 5:06 p.m.)
>
>
> Review request for hive and Ashutosh Chauhan.
>
>
> Bugs: HIVE-3976
>     https://issues.apache.org/jira/browse/HIVE-3976
>
>
> Repository: hive-git
>
>
> Description
> -------
>
> This patch is one of the major pieces to support precision/scale for Hive decimal data type. The following are the highlights:
>
> 1. Grammar changes to allow optional precision/scale.
> 2. Semantical check added for decimal precision/scale.
> 3. Type info and object inspector factory changes.
> 4. UDF changes
> 5. Precision/scale enforcement in relavent object inspectors.
> 6. Test case changes/fixes.
> 7. New test cases.
>
>
> Diffs
> -----
>
>   build.properties e1cd386
>   common/src/java/org/apache/hadoop/hive/common/type/HiveDecimal.java cae8db6
>   common/src/test/org/apache/hadoop/hive/common/type/TestHiveDecimal.java PRE-CREATION
>   data/files/kv9.txt PRE-CREATION
>   jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveResultSetMetaData.java 94b6ecd
>   jdbc/src/java/org/apache/hadoop/hive/jdbc/Utils.java bd98274
>   jdbc/src/test/org/apache/hadoop/hive/jdbc/TestJdbcDriver.java e1107dd
>   jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java e667aa6
>   ql/src/java/org/apache/hadoop/hive/ql/Driver.java d14bbcb
>   ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 41d5dd0
>   ql/src/java/org/apache/hadoop/hive/ql/exec/NumericOpMethodResolver.java 48dd7fd
>   ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcStruct.java 65ee066
>   ql/src/java/org/apache/hadoop/hive/ql/io/orc/WriterImpl.java e4ade90
>   ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java 037191a
>   ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g 1f7b247
>   ql/src/java/org/apache/hadoop/hive/ql/parse/ParseUtils.java 12a0a69
>   ql/src/java/org/apache/hadoop/hive/ql/parse/TypeCheckProcFactory.java 82f3e47
>   ql/src/java/org/apache/hadoop/hive/ql/udf/UDFOPDivide.java f6167d4
>   ql/src/java/org/apache/hadoop/hive/ql/udf/UDFOPPlus.java 49c66cb
>   ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFBridge.java c3c8ddc
>   ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFToDecimal.java 60fe479
>   ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFToVarchar.java 58eca86
>   ql/src/test/org/apache/hadoop/hive/ql/exec/TestFunctionRegistry.java 50613f3
>   ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestOrcFile.java 42bf9e4
>   ql/src/test/org/apache/hadoop/hive/ql/parse/TestHiveDecimalParse.java PRE-CREATION
>   ql/src/test/queries/clientpositive/decimal_1.q 6c689e1
>   ql/src/test/queries/clientpositive/decimal_2.q 4890618
>   ql/src/test/queries/clientpositive/decimal_3.q 28211e3
>   ql/src/test/queries/clientpositive/decimal_4.q e8a89c1
>   ql/src/test/queries/clientpositive/decimal_5.q PRE-CREATION
>   ql/src/test/queries/clientpositive/decimal_6.q PRE-CREATION
>   ql/src/test/queries/clientpositive/decimal_join.q 589fc65
>   ql/src/test/queries/clientpositive/decimal_precision.q 403c2be