You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2020/12/02 04:02:54 UTC

[GitHub] [hive] nrg4878 commented on a change in pull request #1681: HIVE-24397 : Add the projection specification to the table request object and add placeholders in ObjectStore.java

nrg4878 commented on a change in pull request #1681:
URL: https://github.com/apache/hive/pull/1681#discussion_r533881997



##########
File path: standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java
##########
@@ -733,6 +733,27 @@ Table getTable(String catName, String dbName, String tableName,
   List<Table> getTableObjectsByName(String dbName, List<String> tableNames)
       throws MetaException, InvalidOperationException, UnknownDBException, TException;
 
+
+  /**
+   * Get tables as objects (rather than just fetching their names).  This is more expensive and
+   * should only be used if you actually need all the information about the tables.
+   * @param request GetTablesRequest Object.
+   * @return A list of objects representing the tables.
+   *          Only the tables that can be retrieved from the database are returned.  For example,
+   *          if none of the requested tables could be retrieved, an empty list is returned.
+   *          There is no guarantee of ordering of the returned tables.
+   * @throws InvalidOperationException
+   *          The input to this operation is invalid (e.g., the list of tables names is null)
+   * @throws UnknownDBException
+   *          The requested database could not be fetched.
+   * @throws TException
+   *          A thrift communication error occurred
+   * @throws MetaException
+   *          Any other errors
+   */
+  GetTablesResult getTables(GetTablesRequest request)

Review comment:
       This method should have a different signature. So the Request/Result objects are serialized/deserialized between the client and the server. The client side application code (for example HiveServer2) should not have to deal with Request/Response objects.
   So HS2 will invoke something like this
   IMetastoreClient.getTableObjectsByName(String catName, String dbName, List<String> tableNames)
   or
   IMetastoreClient.getTableObjectsByName(String catName, String dbName, List<String> tableNames, GetProjectionSpec projectionSpec)
   
   These 2 methods internally have to build a GetTablesRequest object based on the arguments, make the thrift call which returns the GetTablesResults object, which then have to be returned to calls as List<Table>
   
   So the signature should be something like this
   List<Table> getTables/getTableObjectsByName(catName, dbName, tableNames, projectionSpec)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org