[
https://issues.apache.org/jira/browse/HIVE-5204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13757301#comment-13757301
]
Edward Capriolo commented on HIVE-5204:
---------------------------------------
This seems odd. Are these constants used anywhere else? I feel like other
serde's might reference these directly.
{quote}
- registerNumericType(serdeConstants.TINYINT_TYPE_NAME, 1);
- registerNumericType(serdeConstants.SMALLINT_TYPE_NAME, 2);
- registerNumericType(serdeConstants.INT_TYPE_NAME, 3);
- registerNumericType(serdeConstants.BIGINT_TYPE_NAME, 4);
- registerNumericType(serdeConstants.FLOAT_TYPE_NAME, 5);
- registerNumericType(serdeConstants.DOUBLE_TYPE_NAME, 6);
- registerNumericType(serdeConstants.DECIMAL_TYPE_NAME, 7);
- registerNumericType(serdeConstants.STRING_TYPE_NAME, 8);
+ registerNumericType(PrimitiveCategory.BYTE, 1);
+ registerNumericType(PrimitiveCategory.SHORT, 2);
+ registerNumericType(PrimitiveCategory.INT, 3);
+ registerNumericType(PrimitiveCategory.LONG, 4);
+ registerNumericType(PrimitiveCategory.FLOAT, 5);
+ registerNumericType(PrimitiveCategory.DOUBLE, 6);
+ registerNumericType(PrimitiveCategory.DECIMAL, 7);
+ registerNumericType(PrimitiveCategory.STRING, 8);
{quote}
> Change type compatibility methods to use PrimitiveCategory rather than
> TypeInfo
> -------------------------------------------------------------------------------
>
> Key: HIVE-5204
> URL: https://issues.apache.org/jira/browse/HIVE-5204
> Project: Hive
> Issue Type: Improvement
> Reporter: Jason Dere
> Assignee: Jason Dere
> Attachments: HIVE-5204.1.patch
>
>
> The type compatibility methods in the FunctionRegistry (getCommonClass,
> implicitConvertable) compare TypeInfo objects directly when its doing its
> type compatibility logic. This won't work as well with qualified types
> (varchar, char, decimal), because we will need different TypeInfo objects to
> represent varchar(5) and varchar(10), and the equality comparisons won't work
> anymore. We can change this logic to look at the PrimitiveCategory for the
> TypeInfo instead.
> NO PRECOMMIT TESTS - dependent on changes in HIVE-5203
--
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