hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From harisan...@apache.org
Subject [6/6] hive git commit: HIVE-13130: HS2 changes : API calls for retrieving primary keys and foreign keys information (Hari Subramaniyan, reviewed by Ashutosh Chauhan)
Date Mon, 25 Apr 2016 19:11:11 GMT
HIVE-13130: HS2 changes : API calls for retrieving primary keys and foreign keys information (Hari Subramaniyan, reviewed by Ashutosh Chauhan)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/f13ee089
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/f13ee089
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/f13ee089

Branch: refs/heads/master
Commit: f13ee089797c3b0a61fd6b053526b8da46ec4d36
Parents: 4536dcd
Author: Hari Subramaniyan <harisankar@apache.org>
Authored: Mon Apr 25 12:10:52 2016 -0700
Committer: Hari Subramaniyan <harisankar@apache.org>
Committed: Mon Apr 25 12:10:52 2016 -0700

----------------------------------------------------------------------
 .../org/apache/hive/jdbc/TestJdbcDriver2.java   |    5 +-
 .../apache/hive/jdbc/HiveDatabaseMetaData.java  |   49 +-
 service-rpc/if/TCLIService.thrift               |   50 +
 .../src/gen/thrift/gen-cpp/TCLIService.cpp      |  812 ++++++++-
 .../src/gen/thrift/gen-cpp/TCLIService.h        |  252 +++
 .../gen-cpp/TCLIService_server.skeleton.cpp     |   10 +
 .../gen/thrift/gen-cpp/TCLIService_types.cpp    |  836 +++++++--
 .../src/gen/thrift/gen-cpp/TCLIService_types.h  |  276 +++
 .../hive/service/rpc/thrift/TCLIService.java    | 1716 ++++++++++++++++++
 .../rpc/thrift/TGetCrossReferenceReq.java       | 1034 +++++++++++
 .../rpc/thrift/TGetCrossReferenceResp.java      |  509 ++++++
 .../service/rpc/thrift/TGetPrimaryKeysReq.java  |  716 ++++++++
 .../service/rpc/thrift/TGetPrimaryKeysResp.java |  509 ++++++
 .../src/gen/thrift/gen-php/TCLIService.php      |  432 +++++
 service-rpc/src/gen/thrift/gen-php/Types.php    |  583 ++++++
 .../gen-py/TCLIService/TCLIService-remote       |   14 +
 .../thrift/gen-py/TCLIService/TCLIService.py    |  378 ++++
 .../src/gen/thrift/gen-py/TCLIService/ttypes.py |  417 +++++
 .../src/gen/thrift/gen-rb/t_c_l_i_service.rb    |  108 ++
 .../gen/thrift/gen-rb/t_c_l_i_service_types.rb  |   90 +
 .../org/apache/hive/service/cli/CLIService.java |   30 +
 .../service/cli/EmbeddedCLIServiceClient.java   |   15 +
 .../apache/hive/service/cli/ICLIService.java    |    8 +
 .../operation/GetCrossReferenceOperation.java   |  169 ++
 .../cli/operation/GetPrimaryKeysOperation.java  |  126 ++
 .../service/cli/operation/OperationManager.java |   19 +
 .../hive/service/cli/session/HiveSession.java   |   28 +
 .../service/cli/session/HiveSessionImpl.java    |   47 +
 .../thrift/RetryingThriftCLIServiceClient.java  |   16 +
 .../service/cli/thrift/ThriftCLIService.java    |   39 +
 .../cli/thrift/ThriftCLIServiceClient.java      |   47 +
 31 files changed, 9188 insertions(+), 152 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/f13ee089/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java
----------------------------------------------------------------------
diff --git a/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java b/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java
index 7028c25..965627f 100644
--- a/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java
+++ b/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java
@@ -369,7 +369,7 @@ public class TestJdbcDriver2 {
     assertNull(rs.getStatement());
     rs.close();
 
-    rs = md.getPrimaryKeys(null, null, null);
+    rs = md.getPrimaryKeys(null, "testdb", tableName);
     assertNull(rs.getStatement());
     rs.close();
 
@@ -2145,8 +2145,7 @@ public void testParseUrlHttpMode() throws SQLException, JdbcUriParseException,
   public void testPrimaryKeys() throws SQLException {
     DatabaseMetaData dbmd = con.getMetaData();
     assertNotNull(dbmd);
-    // currently getPrimaryKeys always returns an empty resultset for Hive
-    ResultSet res = dbmd.getPrimaryKeys(null, null, null);
+    ResultSet res = dbmd.getPrimaryKeys(null, "testdb", tableName);
     ResultSetMetaData md = res.getMetaData();
     assertEquals(md.getColumnCount(), 6);
     assertFalse(res.next());

http://git-wip-us.apache.org/repos/asf/hive/blob/f13ee089/jdbc/src/java/org/apache/hive/jdbc/HiveDatabaseMetaData.java
----------------------------------------------------------------------
diff --git a/jdbc/src/java/org/apache/hive/jdbc/HiveDatabaseMetaData.java b/jdbc/src/java/org/apache/hive/jdbc/HiveDatabaseMetaData.java
index 7e54d1f..9d73470 100644
--- a/jdbc/src/java/org/apache/hive/jdbc/HiveDatabaseMetaData.java
+++ b/jdbc/src/java/org/apache/hive/jdbc/HiveDatabaseMetaData.java
@@ -35,11 +35,15 @@ import org.apache.hive.service.rpc.thrift.TGetCatalogsReq;
 import org.apache.hive.service.rpc.thrift.TGetCatalogsResp;
 import org.apache.hive.service.rpc.thrift.TGetColumnsReq;
 import org.apache.hive.service.rpc.thrift.TGetColumnsResp;
+import org.apache.hive.service.rpc.thrift.TGetCrossReferenceReq;
+import org.apache.hive.service.rpc.thrift.TGetCrossReferenceResp;
 import org.apache.hive.service.rpc.thrift.TGetFunctionsReq;
 import org.apache.hive.service.rpc.thrift.TGetFunctionsResp;
 import org.apache.hive.service.rpc.thrift.TGetInfoReq;
 import org.apache.hive.service.rpc.thrift.TGetInfoResp;
 import org.apache.hive.service.rpc.thrift.TGetInfoType;
+import org.apache.hive.service.rpc.thrift.TGetPrimaryKeysReq;
+import org.apache.hive.service.rpc.thrift.TGetPrimaryKeysResp;
 import org.apache.hive.service.rpc.thrift.TGetSchemasReq;
 import org.apache.hive.service.rpc.thrift.TGetSchemasResp;
 import org.apache.hive.service.rpc.thrift.TGetTableTypesReq;
@@ -255,7 +259,27 @@ public class HiveDatabaseMetaData implements DatabaseMetaData {
   public ResultSet getCrossReference(String primaryCatalog,
       String primarySchema, String primaryTable, String foreignCatalog,
       String foreignSchema, String foreignTable) throws SQLException {
-    throw new SQLException("Method not supported");
+   TGetCrossReferenceResp getFKResp;
+   TGetCrossReferenceReq getFKReq = new TGetCrossReferenceReq(sessHandle);
+   getFKReq.setParentTableName(primaryTable);
+   getFKReq.setParentSchemaName(primarySchema);
+   getFKReq.setParentCatalogName(primaryCatalog);
+   getFKReq.setForeignTableName(foreignTable);
+   getFKReq.setForeignSchemaName(foreignSchema);
+   getFKReq.setForeignCatalogName(foreignCatalog);
+
+   try {
+     getFKResp = client.GetCrossReference(getFKReq);
+   } catch (TException e) {
+     throw new SQLException(e.getMessage(), "08S01", e);
+   }
+   Utils.verifySuccess(getFKResp.getStatus());
+
+   return new HiveQueryResultSet.Builder(connection)
+     .setClient(client)
+     .setSessionHandle(sessHandle)
+     .setStmtHandle(getFKResp.getOperationHandle())
+     .build();
   }
 
   public int getDatabaseMajorVersion() throws SQLException {
@@ -493,12 +517,23 @@ public class HiveDatabaseMetaData implements DatabaseMetaData {
 
   public ResultSet getPrimaryKeys(String catalog, String schema, String table)
       throws SQLException {
-    // Hive doesn't support primary keys
-    // using local schema with empty resultset
-    return new HiveQueryResultSet.Builder(connection).setClient(client).setEmptyResultSet(true).
-        setSchema(Arrays.asList("TABLE_CAT", "TABLE_SCHEM", "TABLE_NAME", "COLUMN_NAME", "KEY_SEQ", "PK_NAME" ),
-            Arrays.asList("STRING",    "STRING",      "STRING",     "STRING",       "INT",  "STRING"))
-            .build();
+    TGetPrimaryKeysResp getPKResp;
+    TGetPrimaryKeysReq getPKReq = new TGetPrimaryKeysReq(sessHandle);
+    getPKReq.setTableName(table);
+    getPKReq.setSchemaName(schema);
+    getPKReq.setCatalogName(catalog);
+    try {
+      getPKResp = client.GetPrimaryKeys(getPKReq);
+    } catch (TException e) {
+      throw new SQLException(e.getMessage(), "08S01", e);
+    }
+    Utils.verifySuccess(getPKResp.getStatus());
+
+    return new HiveQueryResultSet.Builder(connection)
+    .setClient(client)
+    .setSessionHandle(sessHandle)
+    .setStmtHandle(getPKResp.getOperationHandle())
+    .build();
   }
 
   public ResultSet getProcedureColumns(String catalog, String schemaPattern,

http://git-wip-us.apache.org/repos/asf/hive/blob/f13ee089/service-rpc/if/TCLIService.thrift
----------------------------------------------------------------------
diff --git a/service-rpc/if/TCLIService.thrift b/service-rpc/if/TCLIService.thrift
index 674530d..92bcf77 100644
--- a/service-rpc/if/TCLIService.thrift
+++ b/service-rpc/if/TCLIService.thrift
@@ -957,6 +957,52 @@ struct TGetFunctionsResp {
   2: optional TOperationHandle operationHandle
 }
 
+struct TGetPrimaryKeysReq {
+  // Session to run this request against
+  1: required TSessionHandle sessionHandle
+
+  // Name of the catalog.
+  2: optional TIdentifier catalogName
+
+  // Name of the schema.
+  3: optional TIdentifier schemaName
+
+  // Name of the table.
+  4: optional TIdentifier tableName
+}
+
+struct TGetPrimaryKeysResp {
+  1: required TStatus status
+  2: optional TOperationHandle operationHandle
+}
+
+struct TGetCrossReferenceReq {
+  // Session to run this request against
+  1: required TSessionHandle sessionHandle
+
+  // Name of the parent catalog.
+  2: optional TIdentifier parentCatalogName
+
+  // Name of the parent schema.
+  3: optional TIdentifier parentSchemaName
+
+  // Name of the parent table.
+  4: optional TIdentifier parentTableName
+
+  // Name of the foreign catalog.
+  5: optional TIdentifier foreignCatalogName
+
+  // Name of the foreign schema.
+  6: optional TIdentifier foreignSchemaName
+
+  // Name of the foreign table.
+  7: optional TIdentifier foreignTableName
+}
+
+struct TGetCrossReferenceResp {
+  1: required TStatus status
+  2: optional TOperationHandle operationHandle
+}
 
 // GetOperationStatus()
 //
@@ -1167,6 +1213,10 @@ service TCLIService {
 
   TGetFunctionsResp GetFunctions(1:TGetFunctionsReq req);
 
+  TGetPrimaryKeysResp GetPrimaryKeys(1:TGetPrimaryKeysReq req);
+
+  TGetCrossReferenceResp GetCrossReference(1:TGetCrossReferenceReq req);
+
   TGetOperationStatusResp GetOperationStatus(1:TGetOperationStatusReq req);
 
   TCancelOperationResp CancelOperation(1:TCancelOperationReq req);

http://git-wip-us.apache.org/repos/asf/hive/blob/f13ee089/service-rpc/src/gen/thrift/gen-cpp/TCLIService.cpp
----------------------------------------------------------------------
diff --git a/service-rpc/src/gen/thrift/gen-cpp/TCLIService.cpp b/service-rpc/src/gen/thrift/gen-cpp/TCLIService.cpp
index fc82b88..3597d44 100644
--- a/service-rpc/src/gen/thrift/gen-cpp/TCLIService.cpp
+++ b/service-rpc/src/gen/thrift/gen-cpp/TCLIService.cpp
@@ -2066,6 +2066,380 @@ uint32_t TCLIService_GetFunctions_presult::read(::apache::thrift::protocol::TPro
 }
 
 
+TCLIService_GetPrimaryKeys_args::~TCLIService_GetPrimaryKeys_args() throw() {
+}
+
+
+uint32_t TCLIService_GetPrimaryKeys_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->req.read(iprot);
+          this->__isset.req = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t TCLIService_GetPrimaryKeys_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
+  xfer += oprot->writeStructBegin("TCLIService_GetPrimaryKeys_args");
+
+  xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1);
+  xfer += this->req.write(oprot);
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+
+TCLIService_GetPrimaryKeys_pargs::~TCLIService_GetPrimaryKeys_pargs() throw() {
+}
+
+
+uint32_t TCLIService_GetPrimaryKeys_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
+  xfer += oprot->writeStructBegin("TCLIService_GetPrimaryKeys_pargs");
+
+  xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1);
+  xfer += (*(this->req)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+
+TCLIService_GetPrimaryKeys_result::~TCLIService_GetPrimaryKeys_result() throw() {
+}
+
+
+uint32_t TCLIService_GetPrimaryKeys_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->success.read(iprot);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t TCLIService_GetPrimaryKeys_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("TCLIService_GetPrimaryKeys_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0);
+    xfer += this->success.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+
+TCLIService_GetPrimaryKeys_presult::~TCLIService_GetPrimaryKeys_presult() throw() {
+}
+
+
+uint32_t TCLIService_GetPrimaryKeys_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += (*(this->success)).read(iprot);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+
+TCLIService_GetCrossReference_args::~TCLIService_GetCrossReference_args() throw() {
+}
+
+
+uint32_t TCLIService_GetCrossReference_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->req.read(iprot);
+          this->__isset.req = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t TCLIService_GetCrossReference_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
+  xfer += oprot->writeStructBegin("TCLIService_GetCrossReference_args");
+
+  xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1);
+  xfer += this->req.write(oprot);
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+
+TCLIService_GetCrossReference_pargs::~TCLIService_GetCrossReference_pargs() throw() {
+}
+
+
+uint32_t TCLIService_GetCrossReference_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
+  xfer += oprot->writeStructBegin("TCLIService_GetCrossReference_pargs");
+
+  xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1);
+  xfer += (*(this->req)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+
+TCLIService_GetCrossReference_result::~TCLIService_GetCrossReference_result() throw() {
+}
+
+
+uint32_t TCLIService_GetCrossReference_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->success.read(iprot);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t TCLIService_GetCrossReference_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("TCLIService_GetCrossReference_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0);
+    xfer += this->success.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+
+TCLIService_GetCrossReference_presult::~TCLIService_GetCrossReference_presult() throw() {
+}
+
+
+uint32_t TCLIService_GetCrossReference_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += (*(this->success)).read(iprot);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+
 TCLIService_GetOperationStatus_args::~TCLIService_GetOperationStatus_args() throw() {
 }
 
@@ -4065,12 +4439,128 @@ void TCLIServiceClient::recv_GetTableTypes(TGetTableTypesResp& _return)
     iprot_->readMessageEnd();
     iprot_->getTransport()->readEnd();
   }
-  if (fname.compare("GetTableTypes") != 0) {
+  if (fname.compare("GetTableTypes") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  TCLIService_GetTableTypes_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "GetTableTypes failed: unknown result");
+}
+
+void TCLIServiceClient::GetColumns(TGetColumnsResp& _return, const TGetColumnsReq& req)
+{
+  send_GetColumns(req);
+  recv_GetColumns(_return);
+}
+
+void TCLIServiceClient::send_GetColumns(const TGetColumnsReq& req)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("GetColumns", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  TCLIService_GetColumns_pargs args;
+  args.req = &req;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void TCLIServiceClient::recv_GetColumns(TGetColumnsResp& _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("GetColumns") != 0) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  TCLIService_GetColumns_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "GetColumns failed: unknown result");
+}
+
+void TCLIServiceClient::GetFunctions(TGetFunctionsResp& _return, const TGetFunctionsReq& req)
+{
+  send_GetFunctions(req);
+  recv_GetFunctions(_return);
+}
+
+void TCLIServiceClient::send_GetFunctions(const TGetFunctionsReq& req)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("GetFunctions", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  TCLIService_GetFunctions_pargs args;
+  args.req = &req;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+}
+
+void TCLIServiceClient::recv_GetFunctions(TGetFunctionsResp& _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+    ::apache::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != ::apache::thrift::protocol::T_REPLY) {
+    iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+  }
+  if (fname.compare("GetFunctions") != 0) {
     iprot_->skip(::apache::thrift::protocol::T_STRUCT);
     iprot_->readMessageEnd();
     iprot_->getTransport()->readEnd();
   }
-  TCLIService_GetTableTypes_presult result;
+  TCLIService_GetFunctions_presult result;
   result.success = &_return;
   result.read(iprot_);
   iprot_->readMessageEnd();
@@ -4080,21 +4570,21 @@ void TCLIServiceClient::recv_GetTableTypes(TGetTableTypesResp& _return)
     // _return pointer has now been filled
     return;
   }
-  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "GetTableTypes failed: unknown result");
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "GetFunctions failed: unknown result");
 }
 
-void TCLIServiceClient::GetColumns(TGetColumnsResp& _return, const TGetColumnsReq& req)
+void TCLIServiceClient::GetPrimaryKeys(TGetPrimaryKeysResp& _return, const TGetPrimaryKeysReq& req)
 {
-  send_GetColumns(req);
-  recv_GetColumns(_return);
+  send_GetPrimaryKeys(req);
+  recv_GetPrimaryKeys(_return);
 }
 
-void TCLIServiceClient::send_GetColumns(const TGetColumnsReq& req)
+void TCLIServiceClient::send_GetPrimaryKeys(const TGetPrimaryKeysReq& req)
 {
   int32_t cseqid = 0;
-  oprot_->writeMessageBegin("GetColumns", ::apache::thrift::protocol::T_CALL, cseqid);
+  oprot_->writeMessageBegin("GetPrimaryKeys", ::apache::thrift::protocol::T_CALL, cseqid);
 
-  TCLIService_GetColumns_pargs args;
+  TCLIService_GetPrimaryKeys_pargs args;
   args.req = &req;
   args.write(oprot_);
 
@@ -4103,7 +4593,7 @@ void TCLIServiceClient::send_GetColumns(const TGetColumnsReq& req)
   oprot_->getTransport()->flush();
 }
 
-void TCLIServiceClient::recv_GetColumns(TGetColumnsResp& _return)
+void TCLIServiceClient::recv_GetPrimaryKeys(TGetPrimaryKeysResp& _return)
 {
 
   int32_t rseqid = 0;
@@ -4123,12 +4613,12 @@ void TCLIServiceClient::recv_GetColumns(TGetColumnsResp& _return)
     iprot_->readMessageEnd();
     iprot_->getTransport()->readEnd();
   }
-  if (fname.compare("GetColumns") != 0) {
+  if (fname.compare("GetPrimaryKeys") != 0) {
     iprot_->skip(::apache::thrift::protocol::T_STRUCT);
     iprot_->readMessageEnd();
     iprot_->getTransport()->readEnd();
   }
-  TCLIService_GetColumns_presult result;
+  TCLIService_GetPrimaryKeys_presult result;
   result.success = &_return;
   result.read(iprot_);
   iprot_->readMessageEnd();
@@ -4138,21 +4628,21 @@ void TCLIServiceClient::recv_GetColumns(TGetColumnsResp& _return)
     // _return pointer has now been filled
     return;
   }
-  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "GetColumns failed: unknown result");
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "GetPrimaryKeys failed: unknown result");
 }
 
-void TCLIServiceClient::GetFunctions(TGetFunctionsResp& _return, const TGetFunctionsReq& req)
+void TCLIServiceClient::GetCrossReference(TGetCrossReferenceResp& _return, const TGetCrossReferenceReq& req)
 {
-  send_GetFunctions(req);
-  recv_GetFunctions(_return);
+  send_GetCrossReference(req);
+  recv_GetCrossReference(_return);
 }
 
-void TCLIServiceClient::send_GetFunctions(const TGetFunctionsReq& req)
+void TCLIServiceClient::send_GetCrossReference(const TGetCrossReferenceReq& req)
 {
   int32_t cseqid = 0;
-  oprot_->writeMessageBegin("GetFunctions", ::apache::thrift::protocol::T_CALL, cseqid);
+  oprot_->writeMessageBegin("GetCrossReference", ::apache::thrift::protocol::T_CALL, cseqid);
 
-  TCLIService_GetFunctions_pargs args;
+  TCLIService_GetCrossReference_pargs args;
   args.req = &req;
   args.write(oprot_);
 
@@ -4161,7 +4651,7 @@ void TCLIServiceClient::send_GetFunctions(const TGetFunctionsReq& req)
   oprot_->getTransport()->flush();
 }
 
-void TCLIServiceClient::recv_GetFunctions(TGetFunctionsResp& _return)
+void TCLIServiceClient::recv_GetCrossReference(TGetCrossReferenceResp& _return)
 {
 
   int32_t rseqid = 0;
@@ -4181,12 +4671,12 @@ void TCLIServiceClient::recv_GetFunctions(TGetFunctionsResp& _return)
     iprot_->readMessageEnd();
     iprot_->getTransport()->readEnd();
   }
-  if (fname.compare("GetFunctions") != 0) {
+  if (fname.compare("GetCrossReference") != 0) {
     iprot_->skip(::apache::thrift::protocol::T_STRUCT);
     iprot_->readMessageEnd();
     iprot_->getTransport()->readEnd();
   }
-  TCLIService_GetFunctions_presult result;
+  TCLIService_GetCrossReference_presult result;
   result.success = &_return;
   result.read(iprot_);
   iprot_->readMessageEnd();
@@ -4196,7 +4686,7 @@ void TCLIServiceClient::recv_GetFunctions(TGetFunctionsResp& _return)
     // _return pointer has now been filled
     return;
   }
-  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "GetFunctions failed: unknown result");
+  throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "GetCrossReference failed: unknown result");
 }
 
 void TCLIServiceClient::GetOperationStatus(TGetOperationStatusResp& _return, const TGetOperationStatusReq& req)
@@ -5276,6 +5766,114 @@ void TCLIServiceProcessor::process_GetFunctions(int32_t seqid, ::apache::thrift:
   }
 }
 
+void TCLIServiceProcessor::process_GetPrimaryKeys(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (this->eventHandler_.get() != NULL) {
+    ctx = this->eventHandler_->getContext("TCLIService.GetPrimaryKeys", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TCLIService.GetPrimaryKeys");
+
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preRead(ctx, "TCLIService.GetPrimaryKeys");
+  }
+
+  TCLIService_GetPrimaryKeys_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postRead(ctx, "TCLIService.GetPrimaryKeys", bytes);
+  }
+
+  TCLIService_GetPrimaryKeys_result result;
+  try {
+    iface_->GetPrimaryKeys(result.success, args.req);
+    result.__isset.success = true;
+  } catch (const std::exception& e) {
+    if (this->eventHandler_.get() != NULL) {
+      this->eventHandler_->handlerError(ctx, "TCLIService.GetPrimaryKeys");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("GetPrimaryKeys", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preWrite(ctx, "TCLIService.GetPrimaryKeys");
+  }
+
+  oprot->writeMessageBegin("GetPrimaryKeys", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postWrite(ctx, "TCLIService.GetPrimaryKeys", bytes);
+  }
+}
+
+void TCLIServiceProcessor::process_GetCrossReference(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+  void* ctx = NULL;
+  if (this->eventHandler_.get() != NULL) {
+    ctx = this->eventHandler_->getContext("TCLIService.GetCrossReference", callContext);
+  }
+  ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "TCLIService.GetCrossReference");
+
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preRead(ctx, "TCLIService.GetCrossReference");
+  }
+
+  TCLIService_GetCrossReference_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  uint32_t bytes = iprot->getTransport()->readEnd();
+
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postRead(ctx, "TCLIService.GetCrossReference", bytes);
+  }
+
+  TCLIService_GetCrossReference_result result;
+  try {
+    iface_->GetCrossReference(result.success, args.req);
+    result.__isset.success = true;
+  } catch (const std::exception& e) {
+    if (this->eventHandler_.get() != NULL) {
+      this->eventHandler_->handlerError(ctx, "TCLIService.GetCrossReference");
+    }
+
+    ::apache::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("GetCrossReference", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->writeEnd();
+    oprot->getTransport()->flush();
+    return;
+  }
+
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->preWrite(ctx, "TCLIService.GetCrossReference");
+  }
+
+  oprot->writeMessageBegin("GetCrossReference", ::apache::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  bytes = oprot->getTransport()->writeEnd();
+  oprot->getTransport()->flush();
+
+  if (this->eventHandler_.get() != NULL) {
+    this->eventHandler_->postWrite(ctx, "TCLIService.GetCrossReference", bytes);
+  }
+}
+
 void TCLIServiceProcessor::process_GetOperationStatus(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
 {
   void* ctx = NULL;
@@ -6639,6 +7237,174 @@ void TCLIServiceConcurrentClient::recv_GetFunctions(TGetFunctionsResp& _return,
   } // end while(true)
 }
 
+void TCLIServiceConcurrentClient::GetPrimaryKeys(TGetPrimaryKeysResp& _return, const TGetPrimaryKeysReq& req)
+{
+  int32_t seqid = send_GetPrimaryKeys(req);
+  recv_GetPrimaryKeys(_return, seqid);
+}
+
+int32_t TCLIServiceConcurrentClient::send_GetPrimaryKeys(const TGetPrimaryKeysReq& req)
+{
+  int32_t cseqid = this->sync_.generateSeqId();
+  ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_);
+  oprot_->writeMessageBegin("GetPrimaryKeys", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  TCLIService_GetPrimaryKeys_pargs args;
+  args.req = &req;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+
+  sentry.commit();
+  return cseqid;
+}
+
+void TCLIServiceConcurrentClient::recv_GetPrimaryKeys(TGetPrimaryKeysResp& _return, const int32_t seqid)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  // the read mutex gets dropped and reacquired as part of waitForWork()
+  // The destructor of this sentry wakes up other clients
+  ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid);
+
+  while(true) {
+    if(!this->sync_.getPending(fname, mtype, rseqid)) {
+      iprot_->readMessageBegin(fname, mtype, rseqid);
+    }
+    if(seqid == rseqid) {
+      if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+        ::apache::thrift::TApplicationException x;
+        x.read(iprot_);
+        iprot_->readMessageEnd();
+        iprot_->getTransport()->readEnd();
+        sentry.commit();
+        throw x;
+      }
+      if (mtype != ::apache::thrift::protocol::T_REPLY) {
+        iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+        iprot_->readMessageEnd();
+        iprot_->getTransport()->readEnd();
+      }
+      if (fname.compare("GetPrimaryKeys") != 0) {
+        iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+        iprot_->readMessageEnd();
+        iprot_->getTransport()->readEnd();
+
+        // in a bad state, don't commit
+        using ::apache::thrift::protocol::TProtocolException;
+        throw TProtocolException(TProtocolException::INVALID_DATA);
+      }
+      TCLIService_GetPrimaryKeys_presult result;
+      result.success = &_return;
+      result.read(iprot_);
+      iprot_->readMessageEnd();
+      iprot_->getTransport()->readEnd();
+
+      if (result.__isset.success) {
+        // _return pointer has now been filled
+        sentry.commit();
+        return;
+      }
+      // in a bad state, don't commit
+      throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "GetPrimaryKeys failed: unknown result");
+    }
+    // seqid != rseqid
+    this->sync_.updatePending(fname, mtype, rseqid);
+
+    // this will temporarily unlock the readMutex, and let other clients get work done
+    this->sync_.waitForWork(seqid);
+  } // end while(true)
+}
+
+void TCLIServiceConcurrentClient::GetCrossReference(TGetCrossReferenceResp& _return, const TGetCrossReferenceReq& req)
+{
+  int32_t seqid = send_GetCrossReference(req);
+  recv_GetCrossReference(_return, seqid);
+}
+
+int32_t TCLIServiceConcurrentClient::send_GetCrossReference(const TGetCrossReferenceReq& req)
+{
+  int32_t cseqid = this->sync_.generateSeqId();
+  ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_);
+  oprot_->writeMessageBegin("GetCrossReference", ::apache::thrift::protocol::T_CALL, cseqid);
+
+  TCLIService_GetCrossReference_pargs args;
+  args.req = &req;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->writeEnd();
+  oprot_->getTransport()->flush();
+
+  sentry.commit();
+  return cseqid;
+}
+
+void TCLIServiceConcurrentClient::recv_GetCrossReference(TGetCrossReferenceResp& _return, const int32_t seqid)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TMessageType mtype;
+
+  // the read mutex gets dropped and reacquired as part of waitForWork()
+  // The destructor of this sentry wakes up other clients
+  ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid);
+
+  while(true) {
+    if(!this->sync_.getPending(fname, mtype, rseqid)) {
+      iprot_->readMessageBegin(fname, mtype, rseqid);
+    }
+    if(seqid == rseqid) {
+      if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+        ::apache::thrift::TApplicationException x;
+        x.read(iprot_);
+        iprot_->readMessageEnd();
+        iprot_->getTransport()->readEnd();
+        sentry.commit();
+        throw x;
+      }
+      if (mtype != ::apache::thrift::protocol::T_REPLY) {
+        iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+        iprot_->readMessageEnd();
+        iprot_->getTransport()->readEnd();
+      }
+      if (fname.compare("GetCrossReference") != 0) {
+        iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+        iprot_->readMessageEnd();
+        iprot_->getTransport()->readEnd();
+
+        // in a bad state, don't commit
+        using ::apache::thrift::protocol::TProtocolException;
+        throw TProtocolException(TProtocolException::INVALID_DATA);
+      }
+      TCLIService_GetCrossReference_presult result;
+      result.success = &_return;
+      result.read(iprot_);
+      iprot_->readMessageEnd();
+      iprot_->getTransport()->readEnd();
+
+      if (result.__isset.success) {
+        // _return pointer has now been filled
+        sentry.commit();
+        return;
+      }
+      // in a bad state, don't commit
+      throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "GetCrossReference failed: unknown result");
+    }
+    // seqid != rseqid
+    this->sync_.updatePending(fname, mtype, rseqid);
+
+    // this will temporarily unlock the readMutex, and let other clients get work done
+    this->sync_.waitForWork(seqid);
+  } // end while(true)
+}
+
 void TCLIServiceConcurrentClient::GetOperationStatus(TGetOperationStatusResp& _return, const TGetOperationStatusReq& req)
 {
   int32_t seqid = send_GetOperationStatus(req);

http://git-wip-us.apache.org/repos/asf/hive/blob/f13ee089/service-rpc/src/gen/thrift/gen-cpp/TCLIService.h
----------------------------------------------------------------------
diff --git a/service-rpc/src/gen/thrift/gen-cpp/TCLIService.h b/service-rpc/src/gen/thrift/gen-cpp/TCLIService.h
index 3407564..5fd423d 100644
--- a/service-rpc/src/gen/thrift/gen-cpp/TCLIService.h
+++ b/service-rpc/src/gen/thrift/gen-cpp/TCLIService.h
@@ -32,6 +32,8 @@ class TCLIServiceIf {
   virtual void GetTableTypes(TGetTableTypesResp& _return, const TGetTableTypesReq& req) = 0;
   virtual void GetColumns(TGetColumnsResp& _return, const TGetColumnsReq& req) = 0;
   virtual void GetFunctions(TGetFunctionsResp& _return, const TGetFunctionsReq& req) = 0;
+  virtual void GetPrimaryKeys(TGetPrimaryKeysResp& _return, const TGetPrimaryKeysReq& req) = 0;
+  virtual void GetCrossReference(TGetCrossReferenceResp& _return, const TGetCrossReferenceReq& req) = 0;
   virtual void GetOperationStatus(TGetOperationStatusResp& _return, const TGetOperationStatusReq& req) = 0;
   virtual void CancelOperation(TCancelOperationResp& _return, const TCancelOperationReq& req) = 0;
   virtual void CloseOperation(TCloseOperationResp& _return, const TCloseOperationReq& req) = 0;
@@ -102,6 +104,12 @@ class TCLIServiceNull : virtual public TCLIServiceIf {
   void GetFunctions(TGetFunctionsResp& /* _return */, const TGetFunctionsReq& /* req */) {
     return;
   }
+  void GetPrimaryKeys(TGetPrimaryKeysResp& /* _return */, const TGetPrimaryKeysReq& /* req */) {
+    return;
+  }
+  void GetCrossReference(TGetCrossReferenceResp& /* _return */, const TGetCrossReferenceReq& /* req */) {
+    return;
+  }
   void GetOperationStatus(TGetOperationStatusResp& /* _return */, const TGetOperationStatusReq& /* req */) {
     return;
   }
@@ -1272,6 +1280,214 @@ class TCLIService_GetFunctions_presult {
 
 };
 
+typedef struct _TCLIService_GetPrimaryKeys_args__isset {
+  _TCLIService_GetPrimaryKeys_args__isset() : req(false) {}
+  bool req :1;
+} _TCLIService_GetPrimaryKeys_args__isset;
+
+class TCLIService_GetPrimaryKeys_args {
+ public:
+
+  TCLIService_GetPrimaryKeys_args(const TCLIService_GetPrimaryKeys_args&);
+  TCLIService_GetPrimaryKeys_args& operator=(const TCLIService_GetPrimaryKeys_args&);
+  TCLIService_GetPrimaryKeys_args() {
+  }
+
+  virtual ~TCLIService_GetPrimaryKeys_args() throw();
+  TGetPrimaryKeysReq req;
+
+  _TCLIService_GetPrimaryKeys_args__isset __isset;
+
+  void __set_req(const TGetPrimaryKeysReq& val);
+
+  bool operator == (const TCLIService_GetPrimaryKeys_args & rhs) const
+  {
+    if (!(req == rhs.req))
+      return false;
+    return true;
+  }
+  bool operator != (const TCLIService_GetPrimaryKeys_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const TCLIService_GetPrimaryKeys_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class TCLIService_GetPrimaryKeys_pargs {
+ public:
+
+
+  virtual ~TCLIService_GetPrimaryKeys_pargs() throw();
+  const TGetPrimaryKeysReq* req;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _TCLIService_GetPrimaryKeys_result__isset {
+  _TCLIService_GetPrimaryKeys_result__isset() : success(false) {}
+  bool success :1;
+} _TCLIService_GetPrimaryKeys_result__isset;
+
+class TCLIService_GetPrimaryKeys_result {
+ public:
+
+  TCLIService_GetPrimaryKeys_result(const TCLIService_GetPrimaryKeys_result&);
+  TCLIService_GetPrimaryKeys_result& operator=(const TCLIService_GetPrimaryKeys_result&);
+  TCLIService_GetPrimaryKeys_result() {
+  }
+
+  virtual ~TCLIService_GetPrimaryKeys_result() throw();
+  TGetPrimaryKeysResp success;
+
+  _TCLIService_GetPrimaryKeys_result__isset __isset;
+
+  void __set_success(const TGetPrimaryKeysResp& val);
+
+  bool operator == (const TCLIService_GetPrimaryKeys_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    return true;
+  }
+  bool operator != (const TCLIService_GetPrimaryKeys_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const TCLIService_GetPrimaryKeys_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _TCLIService_GetPrimaryKeys_presult__isset {
+  _TCLIService_GetPrimaryKeys_presult__isset() : success(false) {}
+  bool success :1;
+} _TCLIService_GetPrimaryKeys_presult__isset;
+
+class TCLIService_GetPrimaryKeys_presult {
+ public:
+
+
+  virtual ~TCLIService_GetPrimaryKeys_presult() throw();
+  TGetPrimaryKeysResp* success;
+
+  _TCLIService_GetPrimaryKeys_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _TCLIService_GetCrossReference_args__isset {
+  _TCLIService_GetCrossReference_args__isset() : req(false) {}
+  bool req :1;
+} _TCLIService_GetCrossReference_args__isset;
+
+class TCLIService_GetCrossReference_args {
+ public:
+
+  TCLIService_GetCrossReference_args(const TCLIService_GetCrossReference_args&);
+  TCLIService_GetCrossReference_args& operator=(const TCLIService_GetCrossReference_args&);
+  TCLIService_GetCrossReference_args() {
+  }
+
+  virtual ~TCLIService_GetCrossReference_args() throw();
+  TGetCrossReferenceReq req;
+
+  _TCLIService_GetCrossReference_args__isset __isset;
+
+  void __set_req(const TGetCrossReferenceReq& val);
+
+  bool operator == (const TCLIService_GetCrossReference_args & rhs) const
+  {
+    if (!(req == rhs.req))
+      return false;
+    return true;
+  }
+  bool operator != (const TCLIService_GetCrossReference_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const TCLIService_GetCrossReference_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class TCLIService_GetCrossReference_pargs {
+ public:
+
+
+  virtual ~TCLIService_GetCrossReference_pargs() throw();
+  const TGetCrossReferenceReq* req;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _TCLIService_GetCrossReference_result__isset {
+  _TCLIService_GetCrossReference_result__isset() : success(false) {}
+  bool success :1;
+} _TCLIService_GetCrossReference_result__isset;
+
+class TCLIService_GetCrossReference_result {
+ public:
+
+  TCLIService_GetCrossReference_result(const TCLIService_GetCrossReference_result&);
+  TCLIService_GetCrossReference_result& operator=(const TCLIService_GetCrossReference_result&);
+  TCLIService_GetCrossReference_result() {
+  }
+
+  virtual ~TCLIService_GetCrossReference_result() throw();
+  TGetCrossReferenceResp success;
+
+  _TCLIService_GetCrossReference_result__isset __isset;
+
+  void __set_success(const TGetCrossReferenceResp& val);
+
+  bool operator == (const TCLIService_GetCrossReference_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    return true;
+  }
+  bool operator != (const TCLIService_GetCrossReference_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const TCLIService_GetCrossReference_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _TCLIService_GetCrossReference_presult__isset {
+  _TCLIService_GetCrossReference_presult__isset() : success(false) {}
+  bool success :1;
+} _TCLIService_GetCrossReference_presult__isset;
+
+class TCLIService_GetCrossReference_presult {
+ public:
+
+
+  virtual ~TCLIService_GetCrossReference_presult() throw();
+  TGetCrossReferenceResp* success;
+
+  _TCLIService_GetCrossReference_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
 typedef struct _TCLIService_GetOperationStatus_args__isset {
   _TCLIService_GetOperationStatus_args__isset() : req(false) {}
   bool req :1;
@@ -2162,6 +2378,12 @@ class TCLIServiceClient : virtual public TCLIServiceIf {
   void GetFunctions(TGetFunctionsResp& _return, const TGetFunctionsReq& req);
   void send_GetFunctions(const TGetFunctionsReq& req);
   void recv_GetFunctions(TGetFunctionsResp& _return);
+  void GetPrimaryKeys(TGetPrimaryKeysResp& _return, const TGetPrimaryKeysReq& req);
+  void send_GetPrimaryKeys(const TGetPrimaryKeysReq& req);
+  void recv_GetPrimaryKeys(TGetPrimaryKeysResp& _return);
+  void GetCrossReference(TGetCrossReferenceResp& _return, const TGetCrossReferenceReq& req);
+  void send_GetCrossReference(const TGetCrossReferenceReq& req);
+  void recv_GetCrossReference(TGetCrossReferenceResp& _return);
   void GetOperationStatus(TGetOperationStatusResp& _return, const TGetOperationStatusReq& req);
   void send_GetOperationStatus(const TGetOperationStatusReq& req);
   void recv_GetOperationStatus(TGetOperationStatusResp& _return);
@@ -2212,6 +2434,8 @@ class TCLIServiceProcessor : public ::apache::thrift::TDispatchProcessor {
   void process_GetTableTypes(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
   void process_GetColumns(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
   void process_GetFunctions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_GetPrimaryKeys(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_GetCrossReference(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
   void process_GetOperationStatus(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
   void process_CancelOperation(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
   void process_CloseOperation(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
@@ -2234,6 +2458,8 @@ class TCLIServiceProcessor : public ::apache::thrift::TDispatchProcessor {
     processMap_["GetTableTypes"] = &TCLIServiceProcessor::process_GetTableTypes;
     processMap_["GetColumns"] = &TCLIServiceProcessor::process_GetColumns;
     processMap_["GetFunctions"] = &TCLIServiceProcessor::process_GetFunctions;
+    processMap_["GetPrimaryKeys"] = &TCLIServiceProcessor::process_GetPrimaryKeys;
+    processMap_["GetCrossReference"] = &TCLIServiceProcessor::process_GetCrossReference;
     processMap_["GetOperationStatus"] = &TCLIServiceProcessor::process_GetOperationStatus;
     processMap_["CancelOperation"] = &TCLIServiceProcessor::process_CancelOperation;
     processMap_["CloseOperation"] = &TCLIServiceProcessor::process_CloseOperation;
@@ -2380,6 +2606,26 @@ class TCLIServiceMultiface : virtual public TCLIServiceIf {
     return;
   }
 
+  void GetPrimaryKeys(TGetPrimaryKeysResp& _return, const TGetPrimaryKeysReq& req) {
+    size_t sz = ifaces_.size();
+    size_t i = 0;
+    for (; i < (sz - 1); ++i) {
+      ifaces_[i]->GetPrimaryKeys(_return, req);
+    }
+    ifaces_[i]->GetPrimaryKeys(_return, req);
+    return;
+  }
+
+  void GetCrossReference(TGetCrossReferenceResp& _return, const TGetCrossReferenceReq& req) {
+    size_t sz = ifaces_.size();
+    size_t i = 0;
+    for (; i < (sz - 1); ++i) {
+      ifaces_[i]->GetCrossReference(_return, req);
+    }
+    ifaces_[i]->GetCrossReference(_return, req);
+    return;
+  }
+
   void GetOperationStatus(TGetOperationStatusResp& _return, const TGetOperationStatusReq& req) {
     size_t sz = ifaces_.size();
     size_t i = 0;
@@ -2523,6 +2769,12 @@ class TCLIServiceConcurrentClient : virtual public TCLIServiceIf {
   void GetFunctions(TGetFunctionsResp& _return, const TGetFunctionsReq& req);
   int32_t send_GetFunctions(const TGetFunctionsReq& req);
   void recv_GetFunctions(TGetFunctionsResp& _return, const int32_t seqid);
+  void GetPrimaryKeys(TGetPrimaryKeysResp& _return, const TGetPrimaryKeysReq& req);
+  int32_t send_GetPrimaryKeys(const TGetPrimaryKeysReq& req);
+  void recv_GetPrimaryKeys(TGetPrimaryKeysResp& _return, const int32_t seqid);
+  void GetCrossReference(TGetCrossReferenceResp& _return, const TGetCrossReferenceReq& req);
+  int32_t send_GetCrossReference(const TGetCrossReferenceReq& req);
+  void recv_GetCrossReference(TGetCrossReferenceResp& _return, const int32_t seqid);
   void GetOperationStatus(TGetOperationStatusResp& _return, const TGetOperationStatusReq& req);
   int32_t send_GetOperationStatus(const TGetOperationStatusReq& req);
   void recv_GetOperationStatus(TGetOperationStatusResp& _return, const int32_t seqid);

http://git-wip-us.apache.org/repos/asf/hive/blob/f13ee089/service-rpc/src/gen/thrift/gen-cpp/TCLIService_server.skeleton.cpp
----------------------------------------------------------------------
diff --git a/service-rpc/src/gen/thrift/gen-cpp/TCLIService_server.skeleton.cpp b/service-rpc/src/gen/thrift/gen-cpp/TCLIService_server.skeleton.cpp
index 66ed6a7..5d7caf9 100644
--- a/service-rpc/src/gen/thrift/gen-cpp/TCLIService_server.skeleton.cpp
+++ b/service-rpc/src/gen/thrift/gen-cpp/TCLIService_server.skeleton.cpp
@@ -77,6 +77,16 @@ class TCLIServiceHandler : virtual public TCLIServiceIf {
     printf("GetFunctions\n");
   }
 
+  void GetPrimaryKeys(TGetPrimaryKeysResp& _return, const TGetPrimaryKeysReq& req) {
+    // Your implementation goes here
+    printf("GetPrimaryKeys\n");
+  }
+
+  void GetCrossReference(TGetCrossReferenceResp& _return, const TGetCrossReferenceReq& req) {
+    // Your implementation goes here
+    printf("GetCrossReference\n");
+  }
+
   void GetOperationStatus(TGetOperationStatusResp& _return, const TGetOperationStatusReq& req) {
     // Your implementation goes here
     printf("GetOperationStatus\n");


Mime
View raw message