hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From na...@apache.org
Subject svn commit: r1345318 [6/7] - in /hive/trunk: metastore/if/ metastore/scripts/upgrade/mysql/ metastore/scripts/upgrade/oracle/ metastore/src/gen/thrift/gen-cpp/ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ metastore/src/ge...
Date Fri, 01 Jun 2012 19:35:51 GMT
Modified: hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py?rev=1345318&r1=1345317&r2=1345318&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py Fri Jun  1 19:35:49 2012
@@ -4815,10 +4815,10 @@ class get_databases_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype186, _size183) = iprot.readListBegin()
-          for _i187 in xrange(_size183):
-            _elem188 = iprot.readString();
-            self.success.append(_elem188)
+          (_etype193, _size190) = iprot.readListBegin()
+          for _i194 in xrange(_size190):
+            _elem195 = iprot.readString();
+            self.success.append(_elem195)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -4841,8 +4841,8 @@ class get_databases_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRING, len(self.success))
-      for iter189 in self.success:
-        oprot.writeString(iter189)
+      for iter196 in self.success:
+        oprot.writeString(iter196)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.o1 is not None:
@@ -4937,10 +4937,10 @@ class get_all_databases_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype193, _size190) = iprot.readListBegin()
-          for _i194 in xrange(_size190):
-            _elem195 = iprot.readString();
-            self.success.append(_elem195)
+          (_etype200, _size197) = iprot.readListBegin()
+          for _i201 in xrange(_size197):
+            _elem202 = iprot.readString();
+            self.success.append(_elem202)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -4963,8 +4963,8 @@ class get_all_databases_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRING, len(self.success))
-      for iter196 in self.success:
-        oprot.writeString(iter196)
+      for iter203 in self.success:
+        oprot.writeString(iter203)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.o1 is not None:
@@ -5674,12 +5674,12 @@ class get_type_all_result:
       if fid == 0:
         if ftype == TType.MAP:
           self.success = {}
-          (_ktype198, _vtype199, _size197 ) = iprot.readMapBegin() 
-          for _i201 in xrange(_size197):
-            _key202 = iprot.readString();
-            _val203 = Type()
-            _val203.read(iprot)
-            self.success[_key202] = _val203
+          (_ktype205, _vtype206, _size204 ) = iprot.readMapBegin() 
+          for _i208 in xrange(_size204):
+            _key209 = iprot.readString();
+            _val210 = Type()
+            _val210.read(iprot)
+            self.success[_key209] = _val210
           iprot.readMapEnd()
         else:
           iprot.skip(ftype)
@@ -5702,9 +5702,9 @@ class get_type_all_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.MAP, 0)
       oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.success))
-      for kiter204,viter205 in self.success.items():
-        oprot.writeString(kiter204)
-        viter205.write(oprot)
+      for kiter211,viter212 in self.success.items():
+        oprot.writeString(kiter211)
+        viter212.write(oprot)
       oprot.writeMapEnd()
       oprot.writeFieldEnd()
     if self.o2 is not None:
@@ -5835,11 +5835,11 @@ class get_fields_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype209, _size206) = iprot.readListBegin()
-          for _i210 in xrange(_size206):
-            _elem211 = FieldSchema()
-            _elem211.read(iprot)
-            self.success.append(_elem211)
+          (_etype216, _size213) = iprot.readListBegin()
+          for _i217 in xrange(_size213):
+            _elem218 = FieldSchema()
+            _elem218.read(iprot)
+            self.success.append(_elem218)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -5874,8 +5874,8 @@ class get_fields_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRUCT, len(self.success))
-      for iter212 in self.success:
-        iter212.write(oprot)
+      for iter219 in self.success:
+        iter219.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.o1 is not None:
@@ -6014,11 +6014,11 @@ class get_schema_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype216, _size213) = iprot.readListBegin()
-          for _i217 in xrange(_size213):
-            _elem218 = FieldSchema()
-            _elem218.read(iprot)
-            self.success.append(_elem218)
+          (_etype223, _size220) = iprot.readListBegin()
+          for _i224 in xrange(_size220):
+            _elem225 = FieldSchema()
+            _elem225.read(iprot)
+            self.success.append(_elem225)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -6053,8 +6053,8 @@ class get_schema_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRUCT, len(self.success))
-      for iter219 in self.success:
-        iter219.write(oprot)
+      for iter226 in self.success:
+        iter226.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.o1 is not None:
@@ -6680,10 +6680,10 @@ class get_tables_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype223, _size220) = iprot.readListBegin()
-          for _i224 in xrange(_size220):
-            _elem225 = iprot.readString();
-            self.success.append(_elem225)
+          (_etype230, _size227) = iprot.readListBegin()
+          for _i231 in xrange(_size227):
+            _elem232 = iprot.readString();
+            self.success.append(_elem232)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -6706,8 +6706,8 @@ class get_tables_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRING, len(self.success))
-      for iter226 in self.success:
-        oprot.writeString(iter226)
+      for iter233 in self.success:
+        oprot.writeString(iter233)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.o1 is not None:
@@ -6820,10 +6820,10 @@ class get_all_tables_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype230, _size227) = iprot.readListBegin()
-          for _i231 in xrange(_size227):
-            _elem232 = iprot.readString();
-            self.success.append(_elem232)
+          (_etype237, _size234) = iprot.readListBegin()
+          for _i238 in xrange(_size234):
+            _elem239 = iprot.readString();
+            self.success.append(_elem239)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -6846,8 +6846,8 @@ class get_all_tables_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRING, len(self.success))
-      for iter233 in self.success:
-        oprot.writeString(iter233)
+      for iter240 in self.success:
+        oprot.writeString(iter240)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.o1 is not None:
@@ -7064,10 +7064,10 @@ class get_table_objects_by_name_args:
       elif fid == 2:
         if ftype == TType.LIST:
           self.tbl_names = []
-          (_etype237, _size234) = iprot.readListBegin()
-          for _i238 in xrange(_size234):
-            _elem239 = iprot.readString();
-            self.tbl_names.append(_elem239)
+          (_etype244, _size241) = iprot.readListBegin()
+          for _i245 in xrange(_size241):
+            _elem246 = iprot.readString();
+            self.tbl_names.append(_elem246)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -7088,8 +7088,8 @@ class get_table_objects_by_name_args:
     if self.tbl_names is not None:
       oprot.writeFieldBegin('tbl_names', TType.LIST, 2)
       oprot.writeListBegin(TType.STRING, len(self.tbl_names))
-      for iter240 in self.tbl_names:
-        oprot.writeString(iter240)
+      for iter247 in self.tbl_names:
+        oprot.writeString(iter247)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -7144,11 +7144,11 @@ class get_table_objects_by_name_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype244, _size241) = iprot.readListBegin()
-          for _i245 in xrange(_size241):
-            _elem246 = Table()
-            _elem246.read(iprot)
-            self.success.append(_elem246)
+          (_etype251, _size248) = iprot.readListBegin()
+          for _i252 in xrange(_size248):
+            _elem253 = Table()
+            _elem253.read(iprot)
+            self.success.append(_elem253)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -7183,8 +7183,8 @@ class get_table_objects_by_name_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRUCT, len(self.success))
-      for iter247 in self.success:
-        iter247.write(oprot)
+      for iter254 in self.success:
+        iter254.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.o1 is not None:
@@ -7335,10 +7335,10 @@ class get_table_names_by_filter_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype251, _size248) = iprot.readListBegin()
-          for _i252 in xrange(_size248):
-            _elem253 = iprot.readString();
-            self.success.append(_elem253)
+          (_etype258, _size255) = iprot.readListBegin()
+          for _i259 in xrange(_size255):
+            _elem260 = iprot.readString();
+            self.success.append(_elem260)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -7373,8 +7373,8 @@ class get_table_names_by_filter_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRING, len(self.success))
-      for iter254 in self.success:
-        oprot.writeString(iter254)
+      for iter261 in self.success:
+        oprot.writeString(iter261)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.o1 is not None:
@@ -8097,11 +8097,11 @@ class add_partitions_args:
       if fid == 1:
         if ftype == TType.LIST:
           self.new_parts = []
-          (_etype258, _size255) = iprot.readListBegin()
-          for _i259 in xrange(_size255):
-            _elem260 = Partition()
-            _elem260.read(iprot)
-            self.new_parts.append(_elem260)
+          (_etype265, _size262) = iprot.readListBegin()
+          for _i266 in xrange(_size262):
+            _elem267 = Partition()
+            _elem267.read(iprot)
+            self.new_parts.append(_elem267)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -8118,8 +8118,8 @@ class add_partitions_args:
     if self.new_parts is not None:
       oprot.writeFieldBegin('new_parts', TType.LIST, 1)
       oprot.writeListBegin(TType.STRUCT, len(self.new_parts))
-      for iter261 in self.new_parts:
-        iter261.write(oprot)
+      for iter268 in self.new_parts:
+        iter268.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -8280,10 +8280,10 @@ class append_partition_args:
       elif fid == 3:
         if ftype == TType.LIST:
           self.part_vals = []
-          (_etype265, _size262) = iprot.readListBegin()
-          for _i266 in xrange(_size262):
-            _elem267 = iprot.readString();
-            self.part_vals.append(_elem267)
+          (_etype272, _size269) = iprot.readListBegin()
+          for _i273 in xrange(_size269):
+            _elem274 = iprot.readString();
+            self.part_vals.append(_elem274)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -8308,8 +8308,8 @@ class append_partition_args:
     if self.part_vals is not None:
       oprot.writeFieldBegin('part_vals', TType.LIST, 3)
       oprot.writeListBegin(TType.STRING, len(self.part_vals))
-      for iter268 in self.part_vals:
-        oprot.writeString(iter268)
+      for iter275 in self.part_vals:
+        oprot.writeString(iter275)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -8657,10 +8657,10 @@ class drop_partition_args:
       elif fid == 3:
         if ftype == TType.LIST:
           self.part_vals = []
-          (_etype272, _size269) = iprot.readListBegin()
-          for _i273 in xrange(_size269):
-            _elem274 = iprot.readString();
-            self.part_vals.append(_elem274)
+          (_etype279, _size276) = iprot.readListBegin()
+          for _i280 in xrange(_size276):
+            _elem281 = iprot.readString();
+            self.part_vals.append(_elem281)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -8690,8 +8690,8 @@ class drop_partition_args:
     if self.part_vals is not None:
       oprot.writeFieldBegin('part_vals', TType.LIST, 3)
       oprot.writeListBegin(TType.STRING, len(self.part_vals))
-      for iter275 in self.part_vals:
-        oprot.writeString(iter275)
+      for iter282 in self.part_vals:
+        oprot.writeString(iter282)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.deleteData is not None:
@@ -9024,10 +9024,10 @@ class get_partition_args:
       elif fid == 3:
         if ftype == TType.LIST:
           self.part_vals = []
-          (_etype279, _size276) = iprot.readListBegin()
-          for _i280 in xrange(_size276):
-            _elem281 = iprot.readString();
-            self.part_vals.append(_elem281)
+          (_etype286, _size283) = iprot.readListBegin()
+          for _i287 in xrange(_size283):
+            _elem288 = iprot.readString();
+            self.part_vals.append(_elem288)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -9052,8 +9052,8 @@ class get_partition_args:
     if self.part_vals is not None:
       oprot.writeFieldBegin('part_vals', TType.LIST, 3)
       oprot.writeListBegin(TType.STRING, len(self.part_vals))
-      for iter282 in self.part_vals:
-        oprot.writeString(iter282)
+      for iter289 in self.part_vals:
+        oprot.writeString(iter289)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -9208,10 +9208,10 @@ class get_partition_with_auth_args:
       elif fid == 3:
         if ftype == TType.LIST:
           self.part_vals = []
-          (_etype286, _size283) = iprot.readListBegin()
-          for _i287 in xrange(_size283):
-            _elem288 = iprot.readString();
-            self.part_vals.append(_elem288)
+          (_etype293, _size290) = iprot.readListBegin()
+          for _i294 in xrange(_size290):
+            _elem295 = iprot.readString();
+            self.part_vals.append(_elem295)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -9223,10 +9223,10 @@ class get_partition_with_auth_args:
       elif fid == 5:
         if ftype == TType.LIST:
           self.group_names = []
-          (_etype292, _size289) = iprot.readListBegin()
-          for _i293 in xrange(_size289):
-            _elem294 = iprot.readString();
-            self.group_names.append(_elem294)
+          (_etype299, _size296) = iprot.readListBegin()
+          for _i300 in xrange(_size296):
+            _elem301 = iprot.readString();
+            self.group_names.append(_elem301)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -9251,8 +9251,8 @@ class get_partition_with_auth_args:
     if self.part_vals is not None:
       oprot.writeFieldBegin('part_vals', TType.LIST, 3)
       oprot.writeListBegin(TType.STRING, len(self.part_vals))
-      for iter295 in self.part_vals:
-        oprot.writeString(iter295)
+      for iter302 in self.part_vals:
+        oprot.writeString(iter302)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.user_name is not None:
@@ -9262,8 +9262,8 @@ class get_partition_with_auth_args:
     if self.group_names is not None:
       oprot.writeFieldBegin('group_names', TType.LIST, 5)
       oprot.writeListBegin(TType.STRING, len(self.group_names))
-      for iter296 in self.group_names:
-        oprot.writeString(iter296)
+      for iter303 in self.group_names:
+        oprot.writeString(iter303)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -9655,11 +9655,11 @@ class get_partitions_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype300, _size297) = iprot.readListBegin()
-          for _i301 in xrange(_size297):
-            _elem302 = Partition()
-            _elem302.read(iprot)
-            self.success.append(_elem302)
+          (_etype307, _size304) = iprot.readListBegin()
+          for _i308 in xrange(_size304):
+            _elem309 = Partition()
+            _elem309.read(iprot)
+            self.success.append(_elem309)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -9688,8 +9688,8 @@ class get_partitions_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRUCT, len(self.success))
-      for iter303 in self.success:
-        iter303.write(oprot)
+      for iter310 in self.success:
+        iter310.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.o1 is not None:
@@ -9776,10 +9776,10 @@ class get_partitions_with_auth_args:
       elif fid == 5:
         if ftype == TType.LIST:
           self.group_names = []
-          (_etype307, _size304) = iprot.readListBegin()
-          for _i308 in xrange(_size304):
-            _elem309 = iprot.readString();
-            self.group_names.append(_elem309)
+          (_etype314, _size311) = iprot.readListBegin()
+          for _i315 in xrange(_size311):
+            _elem316 = iprot.readString();
+            self.group_names.append(_elem316)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -9812,8 +9812,8 @@ class get_partitions_with_auth_args:
     if self.group_names is not None:
       oprot.writeFieldBegin('group_names', TType.LIST, 5)
       oprot.writeListBegin(TType.STRING, len(self.group_names))
-      for iter310 in self.group_names:
-        oprot.writeString(iter310)
+      for iter317 in self.group_names:
+        oprot.writeString(iter317)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -9865,11 +9865,11 @@ class get_partitions_with_auth_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype314, _size311) = iprot.readListBegin()
-          for _i315 in xrange(_size311):
-            _elem316 = Partition()
-            _elem316.read(iprot)
-            self.success.append(_elem316)
+          (_etype321, _size318) = iprot.readListBegin()
+          for _i322 in xrange(_size318):
+            _elem323 = Partition()
+            _elem323.read(iprot)
+            self.success.append(_elem323)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -9898,8 +9898,8 @@ class get_partitions_with_auth_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRUCT, len(self.success))
-      for iter317 in self.success:
-        iter317.write(oprot)
+      for iter324 in self.success:
+        iter324.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.o1 is not None:
@@ -10040,10 +10040,10 @@ class get_partition_names_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype321, _size318) = iprot.readListBegin()
-          for _i322 in xrange(_size318):
-            _elem323 = iprot.readString();
-            self.success.append(_elem323)
+          (_etype328, _size325) = iprot.readListBegin()
+          for _i329 in xrange(_size325):
+            _elem330 = iprot.readString();
+            self.success.append(_elem330)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -10066,8 +10066,8 @@ class get_partition_names_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRING, len(self.success))
-      for iter324 in self.success:
-        oprot.writeString(iter324)
+      for iter331 in self.success:
+        oprot.writeString(iter331)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.o2 is not None:
@@ -10137,10 +10137,10 @@ class get_partitions_ps_args:
       elif fid == 3:
         if ftype == TType.LIST:
           self.part_vals = []
-          (_etype328, _size325) = iprot.readListBegin()
-          for _i329 in xrange(_size325):
-            _elem330 = iprot.readString();
-            self.part_vals.append(_elem330)
+          (_etype335, _size332) = iprot.readListBegin()
+          for _i336 in xrange(_size332):
+            _elem337 = iprot.readString();
+            self.part_vals.append(_elem337)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -10170,8 +10170,8 @@ class get_partitions_ps_args:
     if self.part_vals is not None:
       oprot.writeFieldBegin('part_vals', TType.LIST, 3)
       oprot.writeListBegin(TType.STRING, len(self.part_vals))
-      for iter331 in self.part_vals:
-        oprot.writeString(iter331)
+      for iter338 in self.part_vals:
+        oprot.writeString(iter338)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.max_parts is not None:
@@ -10227,11 +10227,11 @@ class get_partitions_ps_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype335, _size332) = iprot.readListBegin()
-          for _i336 in xrange(_size332):
-            _elem337 = Partition()
-            _elem337.read(iprot)
-            self.success.append(_elem337)
+          (_etype342, _size339) = iprot.readListBegin()
+          for _i343 in xrange(_size339):
+            _elem344 = Partition()
+            _elem344.read(iprot)
+            self.success.append(_elem344)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -10260,8 +10260,8 @@ class get_partitions_ps_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRUCT, len(self.success))
-      for iter338 in self.success:
-        iter338.write(oprot)
+      for iter345 in self.success:
+        iter345.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.o1 is not None:
@@ -10341,10 +10341,10 @@ class get_partitions_ps_with_auth_args:
       elif fid == 3:
         if ftype == TType.LIST:
           self.part_vals = []
-          (_etype342, _size339) = iprot.readListBegin()
-          for _i343 in xrange(_size339):
-            _elem344 = iprot.readString();
-            self.part_vals.append(_elem344)
+          (_etype349, _size346) = iprot.readListBegin()
+          for _i350 in xrange(_size346):
+            _elem351 = iprot.readString();
+            self.part_vals.append(_elem351)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -10361,10 +10361,10 @@ class get_partitions_ps_with_auth_args:
       elif fid == 6:
         if ftype == TType.LIST:
           self.group_names = []
-          (_etype348, _size345) = iprot.readListBegin()
-          for _i349 in xrange(_size345):
-            _elem350 = iprot.readString();
-            self.group_names.append(_elem350)
+          (_etype355, _size352) = iprot.readListBegin()
+          for _i356 in xrange(_size352):
+            _elem357 = iprot.readString();
+            self.group_names.append(_elem357)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -10389,8 +10389,8 @@ class get_partitions_ps_with_auth_args:
     if self.part_vals is not None:
       oprot.writeFieldBegin('part_vals', TType.LIST, 3)
       oprot.writeListBegin(TType.STRING, len(self.part_vals))
-      for iter351 in self.part_vals:
-        oprot.writeString(iter351)
+      for iter358 in self.part_vals:
+        oprot.writeString(iter358)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.max_parts is not None:
@@ -10404,8 +10404,8 @@ class get_partitions_ps_with_auth_args:
     if self.group_names is not None:
       oprot.writeFieldBegin('group_names', TType.LIST, 6)
       oprot.writeListBegin(TType.STRING, len(self.group_names))
-      for iter352 in self.group_names:
-        oprot.writeString(iter352)
+      for iter359 in self.group_names:
+        oprot.writeString(iter359)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -10457,11 +10457,11 @@ class get_partitions_ps_with_auth_result
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype356, _size353) = iprot.readListBegin()
-          for _i357 in xrange(_size353):
-            _elem358 = Partition()
-            _elem358.read(iprot)
-            self.success.append(_elem358)
+          (_etype363, _size360) = iprot.readListBegin()
+          for _i364 in xrange(_size360):
+            _elem365 = Partition()
+            _elem365.read(iprot)
+            self.success.append(_elem365)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -10490,8 +10490,8 @@ class get_partitions_ps_with_auth_result
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRUCT, len(self.success))
-      for iter359 in self.success:
-        iter359.write(oprot)
+      for iter366 in self.success:
+        iter366.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.o1 is not None:
@@ -10565,10 +10565,10 @@ class get_partition_names_ps_args:
       elif fid == 3:
         if ftype == TType.LIST:
           self.part_vals = []
-          (_etype363, _size360) = iprot.readListBegin()
-          for _i364 in xrange(_size360):
-            _elem365 = iprot.readString();
-            self.part_vals.append(_elem365)
+          (_etype370, _size367) = iprot.readListBegin()
+          for _i371 in xrange(_size367):
+            _elem372 = iprot.readString();
+            self.part_vals.append(_elem372)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -10598,8 +10598,8 @@ class get_partition_names_ps_args:
     if self.part_vals is not None:
       oprot.writeFieldBegin('part_vals', TType.LIST, 3)
       oprot.writeListBegin(TType.STRING, len(self.part_vals))
-      for iter366 in self.part_vals:
-        oprot.writeString(iter366)
+      for iter373 in self.part_vals:
+        oprot.writeString(iter373)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.max_parts is not None:
@@ -10655,10 +10655,10 @@ class get_partition_names_ps_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype370, _size367) = iprot.readListBegin()
-          for _i371 in xrange(_size367):
-            _elem372 = iprot.readString();
-            self.success.append(_elem372)
+          (_etype377, _size374) = iprot.readListBegin()
+          for _i378 in xrange(_size374):
+            _elem379 = iprot.readString();
+            self.success.append(_elem379)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -10687,8 +10687,8 @@ class get_partition_names_ps_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRING, len(self.success))
-      for iter373 in self.success:
-        oprot.writeString(iter373)
+      for iter380 in self.success:
+        oprot.writeString(iter380)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.o1 is not None:
@@ -10844,11 +10844,11 @@ class get_partitions_by_filter_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype377, _size374) = iprot.readListBegin()
-          for _i378 in xrange(_size374):
-            _elem379 = Partition()
-            _elem379.read(iprot)
-            self.success.append(_elem379)
+          (_etype384, _size381) = iprot.readListBegin()
+          for _i385 in xrange(_size381):
+            _elem386 = Partition()
+            _elem386.read(iprot)
+            self.success.append(_elem386)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -10877,8 +10877,8 @@ class get_partitions_by_filter_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRUCT, len(self.success))
-      for iter380 in self.success:
-        iter380.write(oprot)
+      for iter387 in self.success:
+        iter387.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.o1 is not None:
@@ -10949,10 +10949,10 @@ class get_partitions_by_names_args:
       elif fid == 3:
         if ftype == TType.LIST:
           self.names = []
-          (_etype384, _size381) = iprot.readListBegin()
-          for _i385 in xrange(_size381):
-            _elem386 = iprot.readString();
-            self.names.append(_elem386)
+          (_etype391, _size388) = iprot.readListBegin()
+          for _i392 in xrange(_size388):
+            _elem393 = iprot.readString();
+            self.names.append(_elem393)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -10977,8 +10977,8 @@ class get_partitions_by_names_args:
     if self.names is not None:
       oprot.writeFieldBegin('names', TType.LIST, 3)
       oprot.writeListBegin(TType.STRING, len(self.names))
-      for iter387 in self.names:
-        oprot.writeString(iter387)
+      for iter394 in self.names:
+        oprot.writeString(iter394)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -11030,11 +11030,11 @@ class get_partitions_by_names_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype391, _size388) = iprot.readListBegin()
-          for _i392 in xrange(_size388):
-            _elem393 = Partition()
-            _elem393.read(iprot)
-            self.success.append(_elem393)
+          (_etype398, _size395) = iprot.readListBegin()
+          for _i399 in xrange(_size395):
+            _elem400 = Partition()
+            _elem400.read(iprot)
+            self.success.append(_elem400)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -11063,8 +11063,8 @@ class get_partitions_by_names_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRUCT, len(self.success))
-      for iter394 in self.success:
-        iter394.write(oprot)
+      for iter401 in self.success:
+        iter401.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.o1 is not None:
@@ -11469,10 +11469,10 @@ class rename_partition_args:
       elif fid == 3:
         if ftype == TType.LIST:
           self.part_vals = []
-          (_etype398, _size395) = iprot.readListBegin()
-          for _i399 in xrange(_size395):
-            _elem400 = iprot.readString();
-            self.part_vals.append(_elem400)
+          (_etype405, _size402) = iprot.readListBegin()
+          for _i406 in xrange(_size402):
+            _elem407 = iprot.readString();
+            self.part_vals.append(_elem407)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -11503,8 +11503,8 @@ class rename_partition_args:
     if self.part_vals is not None:
       oprot.writeFieldBegin('part_vals', TType.LIST, 3)
       oprot.writeListBegin(TType.STRING, len(self.part_vals))
-      for iter401 in self.part_vals:
-        oprot.writeString(iter401)
+      for iter408 in self.part_vals:
+        oprot.writeString(iter408)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.new_part is not None:
@@ -11835,10 +11835,10 @@ class partition_name_to_vals_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype405, _size402) = iprot.readListBegin()
-          for _i406 in xrange(_size402):
-            _elem407 = iprot.readString();
-            self.success.append(_elem407)
+          (_etype412, _size409) = iprot.readListBegin()
+          for _i413 in xrange(_size409):
+            _elem414 = iprot.readString();
+            self.success.append(_elem414)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -11861,8 +11861,8 @@ class partition_name_to_vals_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRING, len(self.success))
-      for iter408 in self.success:
-        oprot.writeString(iter408)
+      for iter415 in self.success:
+        oprot.writeString(iter415)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.o1 is not None:
@@ -11975,11 +11975,11 @@ class partition_name_to_spec_result:
       if fid == 0:
         if ftype == TType.MAP:
           self.success = {}
-          (_ktype410, _vtype411, _size409 ) = iprot.readMapBegin() 
-          for _i413 in xrange(_size409):
-            _key414 = iprot.readString();
-            _val415 = iprot.readString();
-            self.success[_key414] = _val415
+          (_ktype417, _vtype418, _size416 ) = iprot.readMapBegin() 
+          for _i420 in xrange(_size416):
+            _key421 = iprot.readString();
+            _val422 = iprot.readString();
+            self.success[_key421] = _val422
           iprot.readMapEnd()
         else:
           iprot.skip(ftype)
@@ -12002,9 +12002,9 @@ class partition_name_to_spec_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.MAP, 0)
       oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success))
-      for kiter416,viter417 in self.success.items():
-        oprot.writeString(kiter416)
-        oprot.writeString(viter417)
+      for kiter423,viter424 in self.success.items():
+        oprot.writeString(kiter423)
+        oprot.writeString(viter424)
       oprot.writeMapEnd()
       oprot.writeFieldEnd()
     if self.o1 is not None:
@@ -12074,11 +12074,11 @@ class markPartitionForEvent_args:
       elif fid == 3:
         if ftype == TType.MAP:
           self.part_vals = {}
-          (_ktype419, _vtype420, _size418 ) = iprot.readMapBegin() 
-          for _i422 in xrange(_size418):
-            _key423 = iprot.readString();
-            _val424 = iprot.readString();
-            self.part_vals[_key423] = _val424
+          (_ktype426, _vtype427, _size425 ) = iprot.readMapBegin() 
+          for _i429 in xrange(_size425):
+            _key430 = iprot.readString();
+            _val431 = iprot.readString();
+            self.part_vals[_key430] = _val431
           iprot.readMapEnd()
         else:
           iprot.skip(ftype)
@@ -12108,9 +12108,9 @@ class markPartitionForEvent_args:
     if self.part_vals is not None:
       oprot.writeFieldBegin('part_vals', TType.MAP, 3)
       oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.part_vals))
-      for kiter425,viter426 in self.part_vals.items():
-        oprot.writeString(kiter425)
-        oprot.writeString(viter426)
+      for kiter432,viter433 in self.part_vals.items():
+        oprot.writeString(kiter432)
+        oprot.writeString(viter433)
       oprot.writeMapEnd()
       oprot.writeFieldEnd()
     if self.eventType is not None:
@@ -12306,11 +12306,11 @@ class isPartitionMarkedForEvent_args:
       elif fid == 3:
         if ftype == TType.MAP:
           self.part_vals = {}
-          (_ktype428, _vtype429, _size427 ) = iprot.readMapBegin() 
-          for _i431 in xrange(_size427):
-            _key432 = iprot.readString();
-            _val433 = iprot.readString();
-            self.part_vals[_key432] = _val433
+          (_ktype435, _vtype436, _size434 ) = iprot.readMapBegin() 
+          for _i438 in xrange(_size434):
+            _key439 = iprot.readString();
+            _val440 = iprot.readString();
+            self.part_vals[_key439] = _val440
           iprot.readMapEnd()
         else:
           iprot.skip(ftype)
@@ -12340,9 +12340,9 @@ class isPartitionMarkedForEvent_args:
     if self.part_vals is not None:
       oprot.writeFieldBegin('part_vals', TType.MAP, 3)
       oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.part_vals))
-      for kiter434,viter435 in self.part_vals.items():
-        oprot.writeString(kiter434)
-        oprot.writeString(viter435)
+      for kiter441,viter442 in self.part_vals.items():
+        oprot.writeString(kiter441)
+        oprot.writeString(viter442)
       oprot.writeMapEnd()
       oprot.writeFieldEnd()
     if self.eventType is not None:
@@ -13314,11 +13314,11 @@ class get_indexes_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype439, _size436) = iprot.readListBegin()
-          for _i440 in xrange(_size436):
-            _elem441 = Index()
-            _elem441.read(iprot)
-            self.success.append(_elem441)
+          (_etype446, _size443) = iprot.readListBegin()
+          for _i447 in xrange(_size443):
+            _elem448 = Index()
+            _elem448.read(iprot)
+            self.success.append(_elem448)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -13347,8 +13347,8 @@ class get_indexes_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRUCT, len(self.success))
-      for iter442 in self.success:
-        iter442.write(oprot)
+      for iter449 in self.success:
+        iter449.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.o1 is not None:
@@ -13489,10 +13489,10 @@ class get_index_names_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype446, _size443) = iprot.readListBegin()
-          for _i447 in xrange(_size443):
-            _elem448 = iprot.readString();
-            self.success.append(_elem448)
+          (_etype453, _size450) = iprot.readListBegin()
+          for _i454 in xrange(_size450):
+            _elem455 = iprot.readString();
+            self.success.append(_elem455)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -13515,8 +13515,8 @@ class get_index_names_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRING, len(self.success))
-      for iter449 in self.success:
-        oprot.writeString(iter449)
+      for iter456 in self.success:
+        oprot.writeString(iter456)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.o2 is not None:
@@ -13876,10 +13876,10 @@ class get_role_names_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype453, _size450) = iprot.readListBegin()
-          for _i454 in xrange(_size450):
-            _elem455 = iprot.readString();
-            self.success.append(_elem455)
+          (_etype460, _size457) = iprot.readListBegin()
+          for _i461 in xrange(_size457):
+            _elem462 = iprot.readString();
+            self.success.append(_elem462)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -13902,8 +13902,8 @@ class get_role_names_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRING, len(self.success))
-      for iter456 in self.success:
-        oprot.writeString(iter456)
+      for iter463 in self.success:
+        oprot.writeString(iter463)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.o1 is not None:
@@ -14376,11 +14376,11 @@ class list_roles_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype460, _size457) = iprot.readListBegin()
-          for _i461 in xrange(_size457):
-            _elem462 = Role()
-            _elem462.read(iprot)
-            self.success.append(_elem462)
+          (_etype467, _size464) = iprot.readListBegin()
+          for _i468 in xrange(_size464):
+            _elem469 = Role()
+            _elem469.read(iprot)
+            self.success.append(_elem469)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -14403,8 +14403,8 @@ class list_roles_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRUCT, len(self.success))
-      for iter463 in self.success:
-        iter463.write(oprot)
+      for iter470 in self.success:
+        iter470.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.o1 is not None:
@@ -14472,10 +14472,10 @@ class get_privilege_set_args:
       elif fid == 3:
         if ftype == TType.LIST:
           self.group_names = []
-          (_etype467, _size464) = iprot.readListBegin()
-          for _i468 in xrange(_size464):
-            _elem469 = iprot.readString();
-            self.group_names.append(_elem469)
+          (_etype474, _size471) = iprot.readListBegin()
+          for _i475 in xrange(_size471):
+            _elem476 = iprot.readString();
+            self.group_names.append(_elem476)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -14500,8 +14500,8 @@ class get_privilege_set_args:
     if self.group_names is not None:
       oprot.writeFieldBegin('group_names', TType.LIST, 3)
       oprot.writeListBegin(TType.STRING, len(self.group_names))
-      for iter470 in self.group_names:
-        oprot.writeString(iter470)
+      for iter477 in self.group_names:
+        oprot.writeString(iter477)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -14708,11 +14708,11 @@ class list_privileges_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype474, _size471) = iprot.readListBegin()
-          for _i475 in xrange(_size471):
-            _elem476 = HiveObjectPrivilege()
-            _elem476.read(iprot)
-            self.success.append(_elem476)
+          (_etype481, _size478) = iprot.readListBegin()
+          for _i482 in xrange(_size478):
+            _elem483 = HiveObjectPrivilege()
+            _elem483.read(iprot)
+            self.success.append(_elem483)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -14735,8 +14735,8 @@ class list_privileges_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRUCT, len(self.success))
-      for iter477 in self.success:
-        iter477.write(oprot)
+      for iter484 in self.success:
+        iter484.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.o1 is not None:
@@ -15061,10 +15061,10 @@ class set_ugi_args:
       elif fid == 2:
         if ftype == TType.LIST:
           self.group_names = []
-          (_etype481, _size478) = iprot.readListBegin()
-          for _i482 in xrange(_size478):
-            _elem483 = iprot.readString();
-            self.group_names.append(_elem483)
+          (_etype488, _size485) = iprot.readListBegin()
+          for _i489 in xrange(_size485):
+            _elem490 = iprot.readString();
+            self.group_names.append(_elem490)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -15085,8 +15085,8 @@ class set_ugi_args:
     if self.group_names is not None:
       oprot.writeFieldBegin('group_names', TType.LIST, 2)
       oprot.writeListBegin(TType.STRING, len(self.group_names))
-      for iter484 in self.group_names:
-        oprot.writeString(iter484)
+      for iter491 in self.group_names:
+        oprot.writeString(iter491)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -15135,10 +15135,10 @@ class set_ugi_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype488, _size485) = iprot.readListBegin()
-          for _i489 in xrange(_size485):
-            _elem490 = iprot.readString();
-            self.success.append(_elem490)
+          (_etype495, _size492) = iprot.readListBegin()
+          for _i496 in xrange(_size492):
+            _elem497 = iprot.readString();
+            self.success.append(_elem497)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -15161,8 +15161,8 @@ class set_ugi_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRING, len(self.success))
-      for iter491 in self.success:
-        oprot.writeString(iter491)
+      for iter498 in self.success:
+        oprot.writeString(iter498)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.o1 is not None:

Modified: hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py?rev=1345318&r1=1345317&r2=1345318&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py Fri Jun  1 19:35:49 2012
@@ -1435,6 +1435,78 @@ class StorageDescriptor:
   def __ne__(self, other):
     return not (self == other)
 
+class TableIdentifier:
+  """
+  Attributes:
+   - dbName
+   - tableName
+  """
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.STRING, 'dbName', None, None, ), # 1
+    (2, TType.STRING, 'tableName', None, None, ), # 2
+  )
+
+  def __init__(self, dbName=None, tableName=None,):
+    self.dbName = dbName
+    self.tableName = tableName
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRING:
+          self.dbName = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      elif fid == 2:
+        if ftype == TType.STRING:
+          self.tableName = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('TableIdentifier')
+    if self.dbName is not None:
+      oprot.writeFieldBegin('dbName', TType.STRING, 1)
+      oprot.writeString(self.dbName)
+      oprot.writeFieldEnd()
+    if self.tableName is not None:
+      oprot.writeFieldBegin('tableName', TType.STRING, 2)
+      oprot.writeString(self.tableName)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def validate(self):
+    return
+
+
+  def __repr__(self):
+    L = ['%s=%r' % (key, value)
+      for key, value in self.__dict__.iteritems()]
+    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
 class Table:
   """
   Attributes:
@@ -1451,6 +1523,8 @@ class Table:
    - viewExpandedText
    - tableType
    - privileges
+   - linkTarget
+   - linkTables
   """
 
   thrift_spec = (
@@ -1468,9 +1542,11 @@ class Table:
     (11, TType.STRING, 'viewExpandedText', None, None, ), # 11
     (12, TType.STRING, 'tableType', None, None, ), # 12
     (13, TType.STRUCT, 'privileges', (PrincipalPrivilegeSet, PrincipalPrivilegeSet.thrift_spec), None, ), # 13
+    (14, TType.STRUCT, 'linkTarget', (TableIdentifier, TableIdentifier.thrift_spec), None, ), # 14
+    (15, TType.LIST, 'linkTables', (TType.STRUCT,(TableIdentifier, TableIdentifier.thrift_spec)), None, ), # 15
   )
 
-  def __init__(self, tableName=None, dbName=None, owner=None, createTime=None, lastAccessTime=None, retention=None, sd=None, partitionKeys=None, parameters=None, viewOriginalText=None, viewExpandedText=None, tableType=None, privileges=None,):
+  def __init__(self, tableName=None, dbName=None, owner=None, createTime=None, lastAccessTime=None, retention=None, sd=None, partitionKeys=None, parameters=None, viewOriginalText=None, viewExpandedText=None, tableType=None, privileges=None, linkTarget=None, linkTables=None,):
     self.tableName = tableName
     self.dbName = dbName
     self.owner = owner
@@ -1484,6 +1560,8 @@ class Table:
     self.viewExpandedText = viewExpandedText
     self.tableType = tableType
     self.privileges = privileges
+    self.linkTarget = linkTarget
+    self.linkTables = linkTables
 
   def read(self, iprot):
     if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
@@ -1573,6 +1651,23 @@ class Table:
           self.privileges.read(iprot)
         else:
           iprot.skip(ftype)
+      elif fid == 14:
+        if ftype == TType.STRUCT:
+          self.linkTarget = TableIdentifier()
+          self.linkTarget.read(iprot)
+        else:
+          iprot.skip(ftype)
+      elif fid == 15:
+        if ftype == TType.LIST:
+          self.linkTables = []
+          (_etype133, _size130) = iprot.readListBegin()
+          for _i134 in xrange(_size130):
+            _elem135 = TableIdentifier()
+            _elem135.read(iprot)
+            self.linkTables.append(_elem135)
+          iprot.readListEnd()
+        else:
+          iprot.skip(ftype)
       else:
         iprot.skip(ftype)
       iprot.readFieldEnd()
@@ -1614,16 +1709,16 @@ class Table:
     if self.partitionKeys is not None:
       oprot.writeFieldBegin('partitionKeys', TType.LIST, 8)
       oprot.writeListBegin(TType.STRUCT, len(self.partitionKeys))
-      for iter130 in self.partitionKeys:
-        iter130.write(oprot)
+      for iter136 in self.partitionKeys:
+        iter136.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.parameters is not None:
       oprot.writeFieldBegin('parameters', TType.MAP, 9)
       oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters))
-      for kiter131,viter132 in self.parameters.items():
-        oprot.writeString(kiter131)
-        oprot.writeString(viter132)
+      for kiter137,viter138 in self.parameters.items():
+        oprot.writeString(kiter137)
+        oprot.writeString(viter138)
       oprot.writeMapEnd()
       oprot.writeFieldEnd()
     if self.viewOriginalText is not None:
@@ -1642,6 +1737,17 @@ class Table:
       oprot.writeFieldBegin('privileges', TType.STRUCT, 13)
       self.privileges.write(oprot)
       oprot.writeFieldEnd()
+    if self.linkTarget is not None:
+      oprot.writeFieldBegin('linkTarget', TType.STRUCT, 14)
+      self.linkTarget.write(oprot)
+      oprot.writeFieldEnd()
+    if self.linkTables is not None:
+      oprot.writeFieldBegin('linkTables', TType.LIST, 15)
+      oprot.writeListBegin(TType.STRUCT, len(self.linkTables))
+      for iter139 in self.linkTables:
+        iter139.write(oprot)
+      oprot.writeListEnd()
+      oprot.writeFieldEnd()
     oprot.writeFieldStop()
     oprot.writeStructEnd()
 
@@ -1707,10 +1813,10 @@ class Partition:
       if fid == 1:
         if ftype == TType.LIST:
           self.values = []
-          (_etype136, _size133) = iprot.readListBegin()
-          for _i137 in xrange(_size133):
-            _elem138 = iprot.readString();
-            self.values.append(_elem138)
+          (_etype143, _size140) = iprot.readListBegin()
+          for _i144 in xrange(_size140):
+            _elem145 = iprot.readString();
+            self.values.append(_elem145)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -1743,11 +1849,11 @@ class Partition:
       elif fid == 7:
         if ftype == TType.MAP:
           self.parameters = {}
-          (_ktype140, _vtype141, _size139 ) = iprot.readMapBegin() 
-          for _i143 in xrange(_size139):
-            _key144 = iprot.readString();
-            _val145 = iprot.readString();
-            self.parameters[_key144] = _val145
+          (_ktype147, _vtype148, _size146 ) = iprot.readMapBegin() 
+          for _i150 in xrange(_size146):
+            _key151 = iprot.readString();
+            _val152 = iprot.readString();
+            self.parameters[_key151] = _val152
           iprot.readMapEnd()
         else:
           iprot.skip(ftype)
@@ -1770,8 +1876,8 @@ class Partition:
     if self.values is not None:
       oprot.writeFieldBegin('values', TType.LIST, 1)
       oprot.writeListBegin(TType.STRING, len(self.values))
-      for iter146 in self.values:
-        oprot.writeString(iter146)
+      for iter153 in self.values:
+        oprot.writeString(iter153)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.dbName is not None:
@@ -1797,9 +1903,9 @@ class Partition:
     if self.parameters is not None:
       oprot.writeFieldBegin('parameters', TType.MAP, 7)
       oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters))
-      for kiter147,viter148 in self.parameters.items():
-        oprot.writeString(kiter147)
-        oprot.writeString(viter148)
+      for kiter154,viter155 in self.parameters.items():
+        oprot.writeString(kiter154)
+        oprot.writeString(viter155)
       oprot.writeMapEnd()
       oprot.writeFieldEnd()
     if self.privileges is not None:
@@ -1918,11 +2024,11 @@ class Index:
       elif fid == 9:
         if ftype == TType.MAP:
           self.parameters = {}
-          (_ktype150, _vtype151, _size149 ) = iprot.readMapBegin() 
-          for _i153 in xrange(_size149):
-            _key154 = iprot.readString();
-            _val155 = iprot.readString();
-            self.parameters[_key154] = _val155
+          (_ktype157, _vtype158, _size156 ) = iprot.readMapBegin() 
+          for _i160 in xrange(_size156):
+            _key161 = iprot.readString();
+            _val162 = iprot.readString();
+            self.parameters[_key161] = _val162
           iprot.readMapEnd()
         else:
           iprot.skip(ftype)
@@ -1976,9 +2082,9 @@ class Index:
     if self.parameters is not None:
       oprot.writeFieldBegin('parameters', TType.MAP, 9)
       oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters))
-      for kiter156,viter157 in self.parameters.items():
-        oprot.writeString(kiter156)
-        oprot.writeString(viter157)
+      for kiter163,viter164 in self.parameters.items():
+        oprot.writeString(kiter163)
+        oprot.writeString(viter164)
       oprot.writeMapEnd()
       oprot.writeFieldEnd()
     if self.deferredRebuild is not None:
@@ -2032,22 +2138,22 @@ class Schema:
       if fid == 1:
         if ftype == TType.LIST:
           self.fieldSchemas = []
-          (_etype161, _size158) = iprot.readListBegin()
-          for _i162 in xrange(_size158):
-            _elem163 = FieldSchema()
-            _elem163.read(iprot)
-            self.fieldSchemas.append(_elem163)
+          (_etype168, _size165) = iprot.readListBegin()
+          for _i169 in xrange(_size165):
+            _elem170 = FieldSchema()
+            _elem170.read(iprot)
+            self.fieldSchemas.append(_elem170)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
       elif fid == 2:
         if ftype == TType.MAP:
           self.properties = {}
-          (_ktype165, _vtype166, _size164 ) = iprot.readMapBegin() 
-          for _i168 in xrange(_size164):
-            _key169 = iprot.readString();
-            _val170 = iprot.readString();
-            self.properties[_key169] = _val170
+          (_ktype172, _vtype173, _size171 ) = iprot.readMapBegin() 
+          for _i175 in xrange(_size171):
+            _key176 = iprot.readString();
+            _val177 = iprot.readString();
+            self.properties[_key176] = _val177
           iprot.readMapEnd()
         else:
           iprot.skip(ftype)
@@ -2064,16 +2170,16 @@ class Schema:
     if self.fieldSchemas is not None:
       oprot.writeFieldBegin('fieldSchemas', TType.LIST, 1)
       oprot.writeListBegin(TType.STRUCT, len(self.fieldSchemas))
-      for iter171 in self.fieldSchemas:
-        iter171.write(oprot)
+      for iter178 in self.fieldSchemas:
+        iter178.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.properties is not None:
       oprot.writeFieldBegin('properties', TType.MAP, 2)
       oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.properties))
-      for kiter172,viter173 in self.properties.items():
-        oprot.writeString(kiter172)
-        oprot.writeString(viter173)
+      for kiter179,viter180 in self.properties.items():
+        oprot.writeString(kiter179)
+        oprot.writeString(viter180)
       oprot.writeMapEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -2120,11 +2226,11 @@ class EnvironmentContext:
       if fid == 1:
         if ftype == TType.MAP:
           self.properties = {}
-          (_ktype175, _vtype176, _size174 ) = iprot.readMapBegin() 
-          for _i178 in xrange(_size174):
-            _key179 = iprot.readString();
-            _val180 = iprot.readString();
-            self.properties[_key179] = _val180
+          (_ktype182, _vtype183, _size181 ) = iprot.readMapBegin() 
+          for _i185 in xrange(_size181):
+            _key186 = iprot.readString();
+            _val187 = iprot.readString();
+            self.properties[_key186] = _val187
           iprot.readMapEnd()
         else:
           iprot.skip(ftype)
@@ -2141,9 +2247,9 @@ class EnvironmentContext:
     if self.properties is not None:
       oprot.writeFieldBegin('properties', TType.MAP, 1)
       oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.properties))
-      for kiter181,viter182 in self.properties.items():
-        oprot.writeString(kiter181)
-        oprot.writeString(viter182)
+      for kiter188,viter189 in self.properties.items():
+        oprot.writeString(kiter188)
+        oprot.writeString(viter189)
       oprot.writeMapEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()

Modified: hive/trunk/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb?rev=1345318&r1=1345317&r2=1345318&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb Fri Jun  1 19:35:49 2012
@@ -322,6 +322,24 @@ class StorageDescriptor
   ::Thrift::Struct.generate_accessors self
 end
 
+class TableIdentifier
+  include ::Thrift::Struct, ::Thrift::Struct_Union
+  DBNAME = 1
+  TABLENAME = 2
+
+  FIELDS = {
+    DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'},
+    TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'}
+  }
+
+  def struct_fields; FIELDS; end
+
+  def validate
+  end
+
+  ::Thrift::Struct.generate_accessors self
+end
+
 class Table
   include ::Thrift::Struct, ::Thrift::Struct_Union
   TABLENAME = 1
@@ -337,6 +355,8 @@ class Table
   VIEWEXPANDEDTEXT = 11
   TABLETYPE = 12
   PRIVILEGES = 13
+  LINKTARGET = 14
+  LINKTABLES = 15
 
   FIELDS = {
     TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'},
@@ -351,7 +371,9 @@ class Table
     VIEWORIGINALTEXT => {:type => ::Thrift::Types::STRING, :name => 'viewOriginalText'},
     VIEWEXPANDEDTEXT => {:type => ::Thrift::Types::STRING, :name => 'viewExpandedText'},
     TABLETYPE => {:type => ::Thrift::Types::STRING, :name => 'tableType'},
-    PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => PrincipalPrivilegeSet, :optional => true}
+    PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => PrincipalPrivilegeSet, :optional => true},
+    LINKTARGET => {:type => ::Thrift::Types::STRUCT, :name => 'linkTarget', :class => TableIdentifier, :optional => true},
+    LINKTABLES => {:type => ::Thrift::Types::LIST, :name => 'linkTables', :element => {:type => ::Thrift::Types::STRUCT, :class => TableIdentifier}, :optional => true}
   }
 
   def struct_fields; FIELDS; end

Modified: hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java?rev=1345318&r1=1345317&r2=1345318&view=diff
==============================================================================
--- hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java (original)
+++ hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java Fri Jun  1 19:35:49 2012
@@ -62,6 +62,7 @@ import org.apache.hadoop.util.StringUtil
 public class MetaStoreUtils {
 
   protected static final Log LOG = LogFactory.getLog("hive.log");
+  protected static final String IDENTIFIER_REGEX = "[a-zA-Z_0-9@]+";
 
   public static final String DEFAULT_DATABASE_NAME = "default";
   public static final String DEFAULT_DATABASE_COMMENT = "Default Hive database";
@@ -295,7 +296,7 @@ public class MetaStoreUtils {
   /**
    * validateName
    *
-   * Checks the name conforms to our standars which are: "[a-zA-z_0-9]+". checks
+   * Checks the name conforms to our standars which are: "[a-zA-z_0-9@]+". checks
    * this is just characters and numbers and _
    *
    * @param name
@@ -305,7 +306,7 @@ public class MetaStoreUtils {
    *              if it doesn't match the pattern.
    */
   static public boolean validateName(String name) {
-    Pattern tpat = Pattern.compile("[\\w_]+");
+    Pattern tpat = Pattern.compile(IDENTIFIER_REGEX);
     Matcher m = tpat.matcher(name);
     if (m.matches()) {
       return true;

Modified: hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java?rev=1345318&r1=1345317&r2=1345318&view=diff
==============================================================================
--- hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java (original)
+++ hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java Fri Jun  1 19:35:49 2012
@@ -75,6 +75,7 @@ import org.apache.hadoop.hive.metastore.
 import org.apache.hadoop.hive.metastore.api.SerDeInfo;
 import org.apache.hadoop.hive.metastore.api.StorageDescriptor;
 import org.apache.hadoop.hive.metastore.api.Table;
+import org.apache.hadoop.hive.metastore.api.TableIdentifier;
 import org.apache.hadoop.hive.metastore.api.Type;
 import org.apache.hadoop.hive.metastore.api.UnknownDBException;
 import org.apache.hadoop.hive.metastore.api.UnknownPartitionException;
@@ -850,6 +851,19 @@ public class ObjectStore implements RawS
     return tables;
   }
 
+  /**
+   * @param mtbl the MTable
+   * @return the TableIdentifier for the passed MTable.
+   */
+  private TableIdentifier extractTableIdentifier(MTable mtbl) {
+    if (mtbl == null) {
+      return null;
+    }
+    return new TableIdentifier(
+        mtbl.getDatabase().getName(),
+        mtbl.getTableName());
+  }
+
   private Table convertToTable(MTable mtbl) throws MetaException {
     if (mtbl == null) {
       return null;
@@ -865,12 +879,25 @@ public class ObjectStore implements RawS
         tableType = TableType.MANAGED_TABLE.toString();
       }
     }
-    return new Table(mtbl.getTableName(), mtbl.getDatabase().getName(), mtbl
+
+    TableIdentifier linkTarget = extractTableIdentifier(mtbl.getLinkTarget());
+    List<TableIdentifier> linkTables = new ArrayList<TableIdentifier>();
+    Set<MTable> linkMTables = mtbl.getLinkTables();
+    if (linkMTables != null) {
+      for (MTable linkMTable : linkMTables) {
+        linkTables.add(extractTableIdentifier(linkMTable));
+      }
+    }
+
+    Table tbl = new Table(mtbl.getTableName(), mtbl.getDatabase().getName(), mtbl
         .getOwner(), mtbl.getCreateTime(), mtbl.getLastAccessTime(), mtbl
         .getRetention(), convertToStorageDescriptor(mtbl.getSd()),
         convertToFieldSchemas(mtbl.getPartitionKeys()), mtbl.getParameters(),
         mtbl.getViewOriginalText(), mtbl.getViewExpandedText(),
         tableType);
+    tbl.setLinkTarget(linkTarget);
+    tbl.setLinkTables(linkTables);
+    return tbl;
   }
 
   private MTable convertToMTable(Table tbl) throws InvalidObjectException,
@@ -902,13 +929,26 @@ public class ObjectStore implements RawS
       }
     }
 
+    MTable linkTarget = null;
+    if (tbl.getLinkTarget() != null) {
+      linkTarget = getMTable(tbl.getLinkTarget().getDbName(),
+          tbl.getLinkTarget().getTableName());
+    }
+    Set<MTable> linkTables = new HashSet<MTable>();
+    List<TableIdentifier> linkTIs = tbl.getLinkTables();
+    if (linkTIs != null) {
+      for (TableIdentifier linkTI : linkTIs) {
+        linkTables.add(getMTable(linkTI.getDbName(),
+            linkTI.getTableName()));
+      }
+    }
     // A new table is always created with a new column descriptor
     return new MTable(tbl.getTableName().toLowerCase(), mdb,
         convertToMStorageDescriptor(tbl.getSd()), tbl.getOwner(), tbl
             .getCreateTime(), tbl.getLastAccessTime(), tbl.getRetention(),
         convertToMFieldSchemas(tbl.getPartitionKeys()), tbl.getParameters(),
         tbl.getViewOriginalText(), tbl.getViewExpandedText(),
-        tableType);
+        tableType, linkTarget, linkTables);
   }
 
   private List<MFieldSchema> convertToMFieldSchemas(List<FieldSchema> keys) {

Modified: hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/TableType.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/TableType.java?rev=1345318&r1=1345317&r2=1345318&view=diff
==============================================================================
--- hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/TableType.java (original)
+++ hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/TableType.java Fri Jun  1 19:35:49 2012
@@ -22,5 +22,10 @@ package org.apache.hadoop.hive.metastore
  * Typesafe enum for types of tables described by the metastore.
  */
 public enum TableType {
-  MANAGED_TABLE, EXTERNAL_TABLE, VIRTUAL_VIEW, INDEX_TABLE
+  MANAGED_TABLE,
+  EXTERNAL_TABLE,
+  VIRTUAL_VIEW,
+  INDEX_TABLE,
+  LINK_TABLE,
+  STATIC_LINK_TABLE
 }

Modified: hive/trunk/metastore/src/model/org/apache/hadoop/hive/metastore/model/MTable.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/model/org/apache/hadoop/hive/metastore/model/MTable.java?rev=1345318&r1=1345317&r2=1345318&view=diff
==============================================================================
--- hive/trunk/metastore/src/model/org/apache/hadoop/hive/metastore/model/MTable.java (original)
+++ hive/trunk/metastore/src/model/org/apache/hadoop/hive/metastore/model/MTable.java Fri Jun  1 19:35:49 2012
@@ -20,6 +20,7 @@ package org.apache.hadoop.hive.metastore
 
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 public class MTable {
   
@@ -35,6 +36,8 @@ public class MTable {
   private String viewOriginalText;
   private String viewExpandedText;
   private String tableType;
+  private MTable linkTarget;
+  private Set<MTable> linkTables;
 
   public MTable() {}
 
@@ -51,11 +54,14 @@ public class MTable {
    * @param viewOriginalText
    * @param viewExpandedText
    * @param tableType
+   * @param linkTarget
+   * @param linkTables
    */
   public MTable(String tableName, MDatabase database, MStorageDescriptor sd, String owner,
       int createTime, int lastAccessTime, int retention, List<MFieldSchema> partitionKeys,
       Map<String, String> parameters,
-      String viewOriginalText, String viewExpandedText, String tableType) {
+      String viewOriginalText, String viewExpandedText, String tableType,
+      MTable linkTarget, Set<MTable> linkTables) {
     this.tableName = tableName;
     this.database = database;
     this.sd = sd;
@@ -68,6 +74,8 @@ public class MTable {
     this.viewOriginalText = viewOriginalText;
     this.viewExpandedText = viewExpandedText;
     this.tableType = tableType;
+    this.linkTarget = linkTarget;
+    this.linkTables = linkTables;
   }
 
   /**
@@ -237,4 +245,32 @@ public class MTable {
   public String getTableType() {
     return tableType;
   }
+
+  /**
+   * @param linkTarget  the table to which this link table points.
+   */
+  public void setLinkTarget(MTable linkTarget) {
+    this.linkTarget = linkTarget;
+  }
+
+  /**
+   * @return the ID of the table to which this link table points.
+   */
+  public MTable getLinkTarget() {
+    return linkTarget;
+  }
+
+  /**
+   * @param linkTables the set of all Link Tables pointing to this table.
+   */
+  public void setLinkTables(Set<MTable> linkTables) {
+    this.linkTables = linkTables;
+  }
+
+  /**
+   * @return the set of all Link Tables pointing to this table.
+   */
+  public Set<MTable> getLinkTables() {
+    return linkTables;
+  }
 }

Modified: hive/trunk/metastore/src/model/package.jdo
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/model/package.jdo?rev=1345318&r1=1345317&r2=1345318&view=diff
==============================================================================
--- hive/trunk/metastore/src/model/package.jdo (original)
+++ hive/trunk/metastore/src/model/package.jdo Fri Jun  1 19:35:49 2012
@@ -173,6 +173,10 @@
       <field name="tableType">
         <column name="TBL_TYPE" length="128" jdbc-type="VARCHAR"/>
       </field>
+      <field name="linkTarget">
+        <column name="LINK_TARGET_ID" target="TBL_ID" insert-value="#NULL"/>
+      </field>
+	  <field name="linkTables" mapped-by="linkTarget"/>      
     </class>
 
     <class name="MSerDeInfo" identity-type="datastore" table="SERDES" detachable="true">

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java?rev=1345318&r1=1345317&r2=1345318&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java Fri Jun  1 19:35:49 2012
@@ -215,6 +215,15 @@ public enum ErrorMsg {
   UDAF_INVALID_LOCATION(10128, "Not yet supported place for UDAF"),
   DROP_PARTITION_NON_STRING_PARTCOLS_NONEQUALITY(10129,
     "Drop partitions for a non string partition columns is not allowed using non-equality"),
+  TABLELINK_TO_OWN_DB(10130, "You cannot create Links to tables in your own database. "
+      + "Links are meant for accessing other databases."),
+  TABLELINK_TO_UNMANAGED_TABLE(10131, "Table Links can only point to Managed Tables. "
+      + "They cannot point to Views, External Tables or other Links."),
+  DROP_COMMAND_FOR_VIEWS(10132, "To drop a view you need to use the DROP VIEW command."),
+  DROP_COMMAND_FOR_TABLELINKS(10133, "To drop a table link you need to use the"
+      + " DROP TABLELINK command." ),
+  DROP_COMMAND_FOR_TABLES(10134, "To drop a base table you need to use the DROP TABLE command."),
+
 
   SCRIPT_INIT_ERROR(20000, "Unable to initialize custom script."),
   SCRIPT_IO_ERROR(20001, "An error occurred while reading or writing to your custom script. "

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java?rev=1345318&r1=1345317&r2=1345318&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java Fri Jun  1 19:35:49 2012
@@ -109,6 +109,7 @@ import org.apache.hadoop.hive.ql.plan.Cr
 import org.apache.hadoop.hive.ql.plan.CreateIndexDesc;
 import org.apache.hadoop.hive.ql.plan.CreateTableDesc;
 import org.apache.hadoop.hive.ql.plan.CreateTableLikeDesc;
+import org.apache.hadoop.hive.ql.plan.CreateTableLinkDesc;
 import org.apache.hadoop.hive.ql.plan.CreateViewDesc;
 import org.apache.hadoop.hive.ql.plan.DDLWork;
 import org.apache.hadoop.hive.ql.plan.DescDatabaseDesc;
@@ -278,6 +279,11 @@ public class DDLTask extends Task<DDLWor
         return createView(db, crtView);
       }
 
+      CreateTableLinkDesc crtTblLinkDesc = work.getCreateTblLinkDesc();
+      if (crtTblLinkDesc != null) {
+        return createTableLink(db, crtTblLinkDesc);
+      }
+
       AddPartitionDesc addPartitionDesc = work.getAddPartitionDesc();
       if (addPartitionDesc != null) {
         return addPartition(db, addPartitionDesc);
@@ -3025,25 +3031,6 @@ public class DDLTask extends Task<DDLWor
 
     if (dropTbl.getPartSpecs() == null) {
       // This is a true DROP TABLE
-      if (tbl != null) {
-        if (tbl.isView()) {
-          if (!dropTbl.getExpectView()) {
-            if (dropTbl.getIfExists()) {
-              return 0;
-            }
-            throw new HiveException("Cannot drop a view with DROP TABLE");
-          }
-        } else {
-          if (dropTbl.getExpectView()) {
-            if (dropTbl.getIfExists()) {
-              return 0;
-            }
-            throw new HiveException(
-              "Cannot drop a base table with DROP VIEW");
-          }
-        }
-      }
-
       if (tbl != null && !tbl.canDrop()) {
         throw new HiveException("Table " + tbl.getTableName() +
             " is protected from being dropped");
@@ -3070,8 +3057,12 @@ public class DDLTask extends Task<DDLWor
         }
       }
 
-      // drop the table
-      db.dropTable(dropTbl.getTableName());
+      if (tbl != null && tbl.isLinkTable()) {
+        // Don't delete the underlying data when dropping a table link.
+        db.dropTable(db.getCurrentDatabase(), dropTbl.getTableName(), false, true);
+      } else {
+        db.dropTable(dropTbl.getTableName());
+      }
       if (tbl != null) {
         work.getOutputs().add(new WriteEntity(tbl));
       }
@@ -3572,6 +3563,43 @@ public class DDLTask extends Task<DDLWor
     return 0;
   }
 
+  /**
+   * Create a table link to an existing table.
+   *
+   * @param db  The database in question.
+   * @param crtTblLinkDesc
+   * @return Returns 0 when execution succeeds and above 0 if it fails.
+   */
+  private int createTableLink(Hive db, CreateTableLinkDesc crtTblLink) throws HiveException {
+    Table tbl = db.getTable(crtTblLink.getTargetDatabase(), crtTblLink.getTargetTable());
+    tbl.setTableName(crtTblLink.getTargetTable() + "@" + crtTblLink.getTargetDatabase());
+    tbl.setDbName(db.getCurrentDatabase());
+    // set owner and creation time
+    int rc = setGenericTableAttributes(tbl);
+    if (rc != 0) {
+      return rc;
+    }
+    tbl.setLastAccessTime((int) (System.currentTimeMillis() / 1000));
+    Map<String, String> params = tbl.getParameters();
+    // Most of the metadata of the target table is retained. However we don't want to
+    // copy the Parameters of the target table because they include several things
+    // that would be wrong to copy like numPartitions, transient_lastDdlTime, etc.
+    params.clear();
+    if (crtTblLink.getLinkProps() != null) {
+      params.putAll(crtTblLink.getLinkProps());
+    }
+    if (crtTblLink.isStaticLink()) {
+      tbl.setTableType(TableType.STATIC_LINK_TABLE);
+    } else {
+      tbl.setTableType(TableType.LINK_TABLE);
+    }
+    tbl.setLinkTarget(crtTblLink.getTargetDatabase(), crtTblLink.getTargetTable());
+
+    db.createTable(tbl);
+    work.getOutputs().add(new WriteEntity(tbl));
+    return 0;
+  }
+
   private int setGenericTableAttributes(Table tbl) {
     try {
       tbl.setOwner(conf.getUser());

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java?rev=1345318&r1=1345317&r2=1345318&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java Fri Jun  1 19:35:49 2012
@@ -43,6 +43,7 @@ import org.apache.hadoop.hive.metastore.
 import org.apache.hadoop.hive.metastore.api.Order;
 import org.apache.hadoop.hive.metastore.api.SerDeInfo;
 import org.apache.hadoop.hive.metastore.api.StorageDescriptor;
+import org.apache.hadoop.hive.metastore.api.TableIdentifier;
 import org.apache.hadoop.hive.ql.io.HiveFileFormatUtils;
 import org.apache.hadoop.hive.ql.io.HiveOutputFormat;
 import org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat;
@@ -148,6 +149,7 @@ public class Table implements Serializab
       t.setTableType(TableType.MANAGED_TABLE.toString());
       t.setDbName(databaseName);
       t.setTableName(tableName);
+      t.setLinkTables(new ArrayList<TableIdentifier>());
     }
     return t;
   }
@@ -183,6 +185,10 @@ public class Table implements Serializab
       assert(getViewExpandedText() == null);
     }
 
+    if (isLinkTable()) {
+      assert(getLinkTarget() != null);
+    }
+
     Iterator<FieldSchema> iterCols = getCols().iterator();
     List<String> colNames = new ArrayList<String>();
     while (iterCols.hasNext()) {
@@ -375,6 +381,18 @@ public class Table implements Serializab
      return Enum.valueOf(TableType.class, tTable.getTableType());
    }
 
+  public void setLinkTarget(String targetDb, String targetTbl) {
+    setLinkTarget(new TableIdentifier(targetDb, targetTbl));
+  }
+
+  public void setLinkTarget(TableIdentifier linkTarget) {
+    tTable.setLinkTarget(linkTarget);
+  }
+
+  public TableIdentifier getLinkTarget() {
+    return tTable.getLinkTarget();
+  }
+
   public ArrayList<StructField> getFields() {
 
     ArrayList<StructField> fields = new ArrayList<StructField>();
@@ -720,6 +738,14 @@ public class Table implements Serializab
   }
 
   /**
+   * @return whether this table is a link table
+   */
+  public boolean isLinkTable() {
+    return TableType.LINK_TABLE.equals(getTableType()) ||
+          TableType.STATIC_LINK_TABLE.equals(getTableType());
+  }
+
+  /**
    * Creates a partition name -> value spec map object
    *
    * @param tp

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java?rev=1345318&r1=1345317&r2=1345318&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java Fri Jun  1 19:35:49 2012
@@ -323,6 +323,10 @@ public abstract class BaseSemanticAnalyz
       } else {
         return unescapeIdentifier(tableNameNode.getChild(0).getText());
       }
+    } else if (tableNameNode.getToken().getType() == HiveParser.TOK_TABLINKNAME) {
+      String dbName = unescapeIdentifier(tableNameNode.getChild(0).getText());
+      String tableName = unescapeIdentifier(tableNameNode.getChild(1).getText());
+      return tableName + "@" + dbName;
     }
     return unescapeIdentifier(tableNameNode.getText());
   }



Mime
View raw message