hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jd...@apache.org
Subject [07/20] hive git commit: HIVE-13351: Support drop Primary Key/Foreign Key constraints (Hari Subramaniyan, reviewed by Ashutosh Chauhan)
Date Thu, 05 May 2016 20:10:46 GMT
http://git-wip-us.apache.org/repos/asf/hive/blob/212077b8/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h b/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h
index 11d3322..990be15 100644
--- a/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h
+++ b/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h
@@ -41,6 +41,7 @@ class ThriftHiveMetastoreIf : virtual public  ::facebook::fb303::FacebookService
   virtual void create_table(const Table& tbl) = 0;
   virtual void create_table_with_environment_context(const Table& tbl, const EnvironmentContext&
environment_context) = 0;
   virtual void create_table_with_constraints(const Table& tbl, const std::vector<SQLPrimaryKey>
& primaryKeys, const std::vector<SQLForeignKey> & foreignKeys) = 0;
+  virtual void drop_constraint(const DropConstraintRequest& req) = 0;
   virtual void drop_table(const std::string& dbname, const std::string& name, const
bool deleteData) = 0;
   virtual void drop_table_with_environment_context(const std::string& dbname, const std::string&
name, const bool deleteData, const EnvironmentContext& environment_context) = 0;
   virtual void get_tables(std::vector<std::string> & _return, const std::string&
db_name, const std::string& pattern) = 0;
@@ -256,6 +257,9 @@ class ThriftHiveMetastoreNull : virtual public ThriftHiveMetastoreIf ,
virtual p
   void create_table_with_constraints(const Table& /* tbl */, const std::vector<SQLPrimaryKey>
& /* primaryKeys */, const std::vector<SQLForeignKey> & /* foreignKeys */) {
     return;
   }
+  void drop_constraint(const DropConstraintRequest& /* req */) {
+    return;
+  }
   void drop_table(const std::string& /* dbname */, const std::string& /* name */,
const bool /* deleteData */) {
     return;
   }
@@ -3032,6 +3036,118 @@ class ThriftHiveMetastore_create_table_with_constraints_presult {
 
 };
 
+typedef struct _ThriftHiveMetastore_drop_constraint_args__isset {
+  _ThriftHiveMetastore_drop_constraint_args__isset() : req(false) {}
+  bool req :1;
+} _ThriftHiveMetastore_drop_constraint_args__isset;
+
+class ThriftHiveMetastore_drop_constraint_args {
+ public:
+
+  ThriftHiveMetastore_drop_constraint_args(const ThriftHiveMetastore_drop_constraint_args&);
+  ThriftHiveMetastore_drop_constraint_args& operator=(const ThriftHiveMetastore_drop_constraint_args&);
+  ThriftHiveMetastore_drop_constraint_args() {
+  }
+
+  virtual ~ThriftHiveMetastore_drop_constraint_args() throw();
+  DropConstraintRequest req;
+
+  _ThriftHiveMetastore_drop_constraint_args__isset __isset;
+
+  void __set_req(const DropConstraintRequest& val);
+
+  bool operator == (const ThriftHiveMetastore_drop_constraint_args & rhs) const
+  {
+    if (!(req == rhs.req))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHiveMetastore_drop_constraint_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHiveMetastore_drop_constraint_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class ThriftHiveMetastore_drop_constraint_pargs {
+ public:
+
+
+  virtual ~ThriftHiveMetastore_drop_constraint_pargs() throw();
+  const DropConstraintRequest* req;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHiveMetastore_drop_constraint_result__isset {
+  _ThriftHiveMetastore_drop_constraint_result__isset() : o1(false), o3(false) {}
+  bool o1 :1;
+  bool o3 :1;
+} _ThriftHiveMetastore_drop_constraint_result__isset;
+
+class ThriftHiveMetastore_drop_constraint_result {
+ public:
+
+  ThriftHiveMetastore_drop_constraint_result(const ThriftHiveMetastore_drop_constraint_result&);
+  ThriftHiveMetastore_drop_constraint_result& operator=(const ThriftHiveMetastore_drop_constraint_result&);
+  ThriftHiveMetastore_drop_constraint_result() {
+  }
+
+  virtual ~ThriftHiveMetastore_drop_constraint_result() throw();
+  NoSuchObjectException o1;
+  MetaException o3;
+
+  _ThriftHiveMetastore_drop_constraint_result__isset __isset;
+
+  void __set_o1(const NoSuchObjectException& val);
+
+  void __set_o3(const MetaException& val);
+
+  bool operator == (const ThriftHiveMetastore_drop_constraint_result & rhs) const
+  {
+    if (!(o1 == rhs.o1))
+      return false;
+    if (!(o3 == rhs.o3))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHiveMetastore_drop_constraint_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHiveMetastore_drop_constraint_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHiveMetastore_drop_constraint_presult__isset {
+  _ThriftHiveMetastore_drop_constraint_presult__isset() : o1(false), o3(false) {}
+  bool o1 :1;
+  bool o3 :1;
+} _ThriftHiveMetastore_drop_constraint_presult__isset;
+
+class ThriftHiveMetastore_drop_constraint_presult {
+ public:
+
+
+  virtual ~ThriftHiveMetastore_drop_constraint_presult() throw();
+  NoSuchObjectException o1;
+  MetaException o3;
+
+  _ThriftHiveMetastore_drop_constraint_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
 typedef struct _ThriftHiveMetastore_drop_table_args__isset {
   _ThriftHiveMetastore_drop_table_args__isset() : dbname(false), name(false), deleteData(false)
{}
   bool dbname :1;
@@ -18851,6 +18967,9 @@ class ThriftHiveMetastoreClient : virtual public ThriftHiveMetastoreIf,
public
   void create_table_with_constraints(const Table& tbl, const std::vector<SQLPrimaryKey>
& primaryKeys, const std::vector<SQLForeignKey> & foreignKeys);
   void send_create_table_with_constraints(const Table& tbl, const std::vector<SQLPrimaryKey>
& primaryKeys, const std::vector<SQLForeignKey> & foreignKeys);
   void recv_create_table_with_constraints();
+  void drop_constraint(const DropConstraintRequest& req);
+  void send_drop_constraint(const DropConstraintRequest& req);
+  void recv_drop_constraint();
   void drop_table(const std::string& dbname, const std::string& name, const bool
deleteData);
   void send_drop_table(const std::string& dbname, const std::string& name, const
bool deleteData);
   void recv_drop_table();
@@ -19261,6 +19380,7 @@ class ThriftHiveMetastoreProcessor : public  ::facebook::fb303::FacebookServiceP
   void process_create_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot,
::apache::thrift::protocol::TProtocol* oprot, void* callContext);
   void process_create_table_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol*
iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
   void process_create_table_with_constraints(int32_t seqid, ::apache::thrift::protocol::TProtocol*
iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_drop_constraint(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot,
::apache::thrift::protocol::TProtocol* oprot, void* callContext);
   void process_drop_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol*
oprot, void* callContext);
   void process_drop_table_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol*
iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
   void process_get_tables(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol*
oprot, void* callContext);
@@ -19411,6 +19531,7 @@ class ThriftHiveMetastoreProcessor : public  ::facebook::fb303::FacebookServiceP
     processMap_["create_table"] = &ThriftHiveMetastoreProcessor::process_create_table;
     processMap_["create_table_with_environment_context"] = &ThriftHiveMetastoreProcessor::process_create_table_with_environment_context;
     processMap_["create_table_with_constraints"] = &ThriftHiveMetastoreProcessor::process_create_table_with_constraints;
+    processMap_["drop_constraint"] = &ThriftHiveMetastoreProcessor::process_drop_constraint;
     processMap_["drop_table"] = &ThriftHiveMetastoreProcessor::process_drop_table;
     processMap_["drop_table_with_environment_context"] = &ThriftHiveMetastoreProcessor::process_drop_table_with_environment_context;
     processMap_["get_tables"] = &ThriftHiveMetastoreProcessor::process_get_tables;
@@ -19752,6 +19873,15 @@ class ThriftHiveMetastoreMultiface : virtual public ThriftHiveMetastoreIf,
publi
     ifaces_[i]->create_table_with_constraints(tbl, primaryKeys, foreignKeys);
   }
 
+  void drop_constraint(const DropConstraintRequest& req) {
+    size_t sz = ifaces_.size();
+    size_t i = 0;
+    for (; i < (sz - 1); ++i) {
+      ifaces_[i]->drop_constraint(req);
+    }
+    ifaces_[i]->drop_constraint(req);
+  }
+
   void drop_table(const std::string& dbname, const std::string& name, const bool
deleteData) {
     size_t sz = ifaces_.size();
     size_t i = 0;
@@ -21045,6 +21175,9 @@ class ThriftHiveMetastoreConcurrentClient : virtual public ThriftHiveMetastoreIf
   void create_table_with_constraints(const Table& tbl, const std::vector<SQLPrimaryKey>
& primaryKeys, const std::vector<SQLForeignKey> & foreignKeys);
   int32_t send_create_table_with_constraints(const Table& tbl, const std::vector<SQLPrimaryKey>
& primaryKeys, const std::vector<SQLForeignKey> & foreignKeys);
   void recv_create_table_with_constraints(const int32_t seqid);
+  void drop_constraint(const DropConstraintRequest& req);
+  int32_t send_drop_constraint(const DropConstraintRequest& req);
+  void recv_drop_constraint(const int32_t seqid);
   void drop_table(const std::string& dbname, const std::string& name, const bool
deleteData);
   int32_t send_drop_table(const std::string& dbname, const std::string& name, const
bool deleteData);
   void recv_drop_table(const int32_t seqid);

http://git-wip-us.apache.org/repos/asf/hive/blob/212077b8/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp b/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp
index fa87e34..2d13e77 100644
--- a/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp
+++ b/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp
@@ -117,6 +117,11 @@ class ThriftHiveMetastoreHandler : virtual public ThriftHiveMetastoreIf
{
     printf("create_table_with_constraints\n");
   }
 
+  void drop_constraint(const DropConstraintRequest& req) {
+    // Your implementation goes here
+    printf("drop_constraint\n");
+  }
+
   void drop_table(const std::string& dbname, const std::string& name, const bool
deleteData) {
     // Your implementation goes here
     printf("drop_table\n");


Mime
View raw message