Vihang Karajgaonkar commented on HIVE-17580:

Thanks [~owen.omalley] for explaining. In that case I think it is better to 
break compatibility on TypeInfo.getCategory() method signature. There hasn't 
been any released version of Hive which has TypeInfo annotated as public API so 
this is as good a time to fix this as any. IMHO Category enum should not be in 
ObjectInspector in the first place. Instead of bending backwards to accommodate 
a design choice which doesn't make sense I think we should fix it. I propose we 
should introduce a new enum called {{MetastoreTypeCategory}} in metastore and 
change the signature of {{getCategory()}} method in {{TypeInfo}} to return 
{{MetastoreTypeCategory}} instead of {{ObjectInspector.Category}}. 
{{ObjectInspector.Category}} would be modified so that there are helper methods 
to map one to another. The values of the enums will also remain the same, so as 
long as someone is using this enum for switch statements it would just work 
without any changes. However, if some project outside hive is using it for 
equality checks, it will not work. Eg:

{{typeInfo.getCategory() == ObjectInspector.Category.PRIMITIVE}} will not work. 
Instead users should use the utility methods to convert them and compare. So in 
this case they could do a {{typeInfo.getCategory() == 
ObjectInspector.Category.PRIMITIVE.toMetastoreTypeCategory()}} to get the 
previous behavior.

> Remove dependency of get_fields_with_environment_context API to serde
> ---------------------------------------------------------------------
>                 Key: HIVE-17580
>                 URL: https://issues.apache.org/jira/browse/HIVE-17580
>             Project: Hive
>          Issue Type: Sub-task
>          Components: Standalone Metastore
>            Reporter: Vihang Karajgaonkar
>            Assignee: Vihang Karajgaonkar
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HIVE-17580.003-standalone-metastore.patch, 
> HIVE-17580.04-standalone-metastore.patch, 
> HIVE-17580.05-standalone-metastore.patch, 
> HIVE-17580.06-standalone-metastore.patch, 
> HIVE-17580.07-standalone-metastore.patch, 
> HIVE-17580.08-standalone-metastore.patch, 
> HIVE-17580.09-standalone-metastore.patch, 
> HIVE-17580.092-standalone-metastore.patch
> {{get_fields_with_environment_context}} metastore API uses {{Deserializer}} 
> class to access the fields metadata for the cases where it is stored along 
> with the data files (avro tables). The problem is Deserializer classes is 
> defined in hive-serde module and in order to make metastore independent of 
> Hive we will have to remove this dependency (atleast we should change it to 
> runtime dependency instead of compile time).
> The other option is investigate if we can use SearchArgument to provide this 
> functionality.

This message was sent by Atlassian JIRA

Reply via email to