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

John Sichi commented on HIVE-1068:
----------------------------------

I found out that the old version of thrift we are using does not support 
generation of native Java5 enums.  Instead, it generates an obsolete 
type-unsafe enum pattern which will go away when we eventually upgrade thrift.

So, I'm thinking of just using a String in both thrift and JDO for the table 
type attribute, and then adding a native Java5 enum to wrap it on levels above 
thrift.

This attribute will be null in the persistence for existing metastore instances 
after upgrade, but I can infer the table type from other attributes (for 
external tables, we have a EXTERNAL=TRUE property set) and replace the null as 
part of retrieving the object definition.


> CREATE VIEW followup:  add a "table type" enum attribute in metastore's 
> MTable, and also null out irrelevant attributes for MTable instances which 
> describe views
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-1068
>                 URL: https://issues.apache.org/jira/browse/HIVE-1068
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Metastore
>    Affects Versions: 0.6.0
>            Reporter: John Sichi
>            Assignee: John Sichi
>             Fix For: 0.6.0
>
>
> Zheng's description:
> 5. TODO: Metadata change: We store "view" definitions in the same metadata 
> table that we store "table" definitions.
> Shall we add a field "table type" so we know whether it's a table, external 
> table, view, or materialized view in the future.
> We should clean up the additional useless fields in "view" - the test output 
> shows that we are storing some garbage information for views.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to