[
https://issues.apache.org/jira/browse/HIVE-24397?focusedWorklogId=518761&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-518761
]
ASF GitHub Bot logged work on HIVE-24397:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 02/Dec/20 04:23
Start Date: 02/Dec/20 04:23
Worklog Time Spent: 10m
Work Description: nrg4878 commented on a change in pull request #1681:
URL: https://github.com/apache/hive/pull/1681#discussion_r533887465
##########
File path:
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java
##########
@@ -1839,13 +1839,27 @@ private MTable getMTable(String catName, String db,
String table) {
return nmtbl.mtbl;
}
- @Override
- public List<Table> getTableObjectsByName(String catName, String db,
List<String> tbl_names)
- throws MetaException, UnknownDBException {
+ private void verifyDBExists(String catName, String db) throws
UnknownDBException {
+ // Need to differentiate between an unmatched pattern and a non-existent
database
+ Query dbExistsQuery = pm.newQuery(MDatabase.class, "name == db &&
catalogName == cat");
+ dbExistsQuery.declareParameters("java.lang.String db, java.lang.String
cat");
+ dbExistsQuery.setUnique(true);
+ dbExistsQuery.setResult("name");
+ String dbNameIfExists = (String) dbExistsQuery.execute(db, catName);
+ if (org.apache.commons.lang3.StringUtils.isEmpty(dbNameIfExists)) {
+ throw new UnknownDBException("Could not find database " +
+ DatabaseName.getQualified(catName, db));
+ }
+ dbExistsQuery.closeAll();
+ }
+
+ private List<Table> getTableObjectsByNameUtil(String catName, String db,
List<String> tbl_names,
Review comment:
instead of adding getTableObjectsByNameUtil() method thats called by
both flavors of getTableObjectsByName(), should we use
1) getTableObjectsByName(String catName, String db, List<String> tbl_names,
GetProjectionsSpec projectionsSpec)
and then
2) getTableObjectsByName(String catName, String db, List<String> tbl_names)
should invoke #1 with a null projectionSpec value
----------------------------------------------------------------
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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 518761)
Time Spent: 1.5h (was: 1h 20m)
> 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: 1.5h
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)