[ https://issues.apache.org/jira/browse/HIVE-24397?focusedWorklogId=518756&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-518756 ]
ASF GitHub Bot logged work on HIVE-24397: ----------------------------------------- Author: ASF GitHub Bot Created on: 02/Dec/20 04:02 Start Date: 02/Dec/20 04:02 Worklog Time Spent: 10m Work Description: 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 518756) Time Spent: 50m (was: 40m) > Add the projection specification to the table request object and add > placeholders in ObjectStore.java > ----------------------------------------------------------------------------------------------------- > > Key: HIVE-24397 > URL: https://issues.apache.org/jira/browse/HIVE-24397 > Project: Hive > Issue Type: Sub-task > Components: Hive > Reporter: Narayanan Venkateswaran > Assignee: Narayanan Venkateswaran > Priority: Minor > Labels: pull-request-available > Time Spent: 50m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)