[
https://issues.apache.org/jira/browse/HIVE-3976?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13723541#comment-13723541
]
Jason Dere commented on HIVE-3976:
----------------------------------
Hi Ed/Xuefu, yeah I have similar issues for setting the length parameter for
char/varchar types for https://issues.apache.org/jira/browse/HIVE-4844. I've
got some prototype code for this, not entirely sure if I have the best
approach, was going to try to work through this a bit more but if you'd like I
can post a patch for you guys to take a look/comment on.
Basically I've added parameterized versions of PrimitiveTypeEntry,
PrimitiveTypeInfo, and ObjectInspector, with additional factory methods for
these types so that the caller can fetch TypeEntry/TypeInfo/ObjectInspector
based on PrimitiveCategory + type parameters. Will definitely need to work out
how this interacts with the existing system as currently all of those types
have liberal use of pointer-based equality, and there seem to be some instances
where it may not be possible to have have access to type params when trying to
get the TypeEntry/TypeInfo/ObjectInspector.
> Support specifying scale and precision with Hive decimal type
> -------------------------------------------------------------
>
> Key: HIVE-3976
> URL: https://issues.apache.org/jira/browse/HIVE-3976
> Project: Hive
> Issue Type: Improvement
> Components: Query Processor, Types
> Reporter: Mark Grover
> Assignee: Xuefu Zhang
>
> HIVE-2693 introduced support for Decimal datatype in Hive. However, the
> current implementation has unlimited precision and provides no way to specify
> precision and scale when creating the table.
> For example, MySQL allows users to specify scale and precision of the decimal
> datatype when creating the table:
> {code}
> CREATE TABLE numbers (a DECIMAL(20,2));
> {code}
> Hive should support something similar too.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira