[ 
https://issues.apache.org/jira/browse/HIVE-17580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16270239#comment-16270239
 ] 

Vihang Karajgaonkar commented on HIVE-17580:
--------------------------------------------

After moving Deserializer, Serializer, AbstractSerde, ObjectInspector to a new 
module in storage-api I realized that I also needed to move the ListOI, MapOI, 
StructOI so that the existing code of MetastoreUtils.getFieldsFromDeserializer 
compiles when moved to standalone MS. For consistency I attempted to move 
ConstantOI, UnionOI and  PrimitiveObjectInspector as well to a new module 
within storage-api. Moving ConstantOI and UnionOI was trivial but moving 
PrimitiveObjectInspector brings along with it whole lot of other stuff. 
PrimitiveObjectInspector needs PrimitiveTypeInfo which needs PrimitiveTypeEntry 
to make the below method work. 
PrimitiveObjectInspectorUtils.getTypeEntryFromTypeName gets the cached 
PrimitiveEntry objects for each primitive types and they bring in all the type 
implementations. Not to mention the TypeInfo needed for PrimitiveTypeInfo. 

{noformat}
public PrimitiveTypeEntry getPrimitiveTypeEntry() {
    return PrimitiveObjectInspectorUtils.getTypeEntryFromTypeName(typeName);
  }
{noformat}

[~alangates] any thoughts or suggestions? I don't think we can make this API 
work without breaking compatibilities. Even if we want to create a compile time 
dependency on Deserializer while keeping the jar(s) in the classpath like 
[~sershe] suggested in HIVE-17714 we still need compile time dependency with 
ListOI, StructOI, MapOI with the current code to get fields from Deserializer. 

> 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
>
> {{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
(v6.4.14#64029)

Reply via email to