dengzhhu653 commented on code in PR #6969:
URL: https://github.com/apache/hive/pull/6969#discussion_r4639745890
##########
service/src/java/org/apache/hive/service/cli/operation/GetColumnsOperation.java:
##########
@@ -235,8 +235,11 @@ private List<HivePrivilegeObject> getPrivObjs(Map<String,
List<String>> db2Tabs)
List<HivePrivilegeObject> privObjs = new ArrayList<>();
for (Entry<String, List<String>> dbTabs : db2Tabs.entrySet()) {
for (String tabName : dbTabs.getValue()) {
- privObjs.add(new
HivePrivilegeObject(HivePrivilegeObjectType.TABLE_OR_VIEW, catalogName,
dbTabs.getKey(),
- tabName));
+
privObjs.add(HivePrivilegeObject.builder(HivePrivilegeObjectType.TABLE_OR_VIEW)
+ .catName(catalogName)
Review Comment:
If the `catalogName` is null, it will be set to
`SessionState.get().getCurrentCatalog()` in `HivePrivilegeObject`, it defaults
to be "hive" which is the same as the catalog these methods use.
As of now, I think the HS2 isn't able to serve multiple catalogs until we
declare this feature is ready, to make things right, the
`SessionState.get().getCurrentCatalog()` returns the default catalog.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]