Skip to content

Conversation

@saihemanth-cloudera
Copy link
Contributor

…veMetaStoreClient#getTables()

What changes were proposed in this pull request?

Table object has table owner information so that authorization can be done on these objects.

Why are the changes needed?

Otherwise, the "show tables" command in beeline shows all the tables in db instead of the user-owned tables. By having this info, we can filter out tables that are not owned by the user.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Local Machine, Remote cluster.

@saihemanth-cloudera saihemanth-cloudera changed the title HIVE-24769: Included owner information included in Table object in Hi… HIVE-24769: Included owner information in the Table object in Hi… Mar 19, 2021
Copy link
Contributor

@nrg4878 nrg4878 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good to me. +1 for me.

req.setCapabilities(version);
req.setTblNames(tables);
req.setTablesPattern(tablePattern);
if (processorCapabilities != null)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the processorIdentifiier.

List<String> parameterVals = new ArrayList<>();
appendSimpleCondition(filterBuilder, "database.name", new String[] {db}, parameterVals);
appendSimpleCondition(filterBuilder, "database.catalogName", new String[] {catName}, parameterVals);
if(tbl_names != null){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add a comment to explain the strategy on how this API uses the input arguments.

@nrg4878
Copy link
Contributor

nrg4878 commented Apr 12, 2021

This is been committed to master. Please close the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants