Skip to content

Conversation

saihemanth-cloudera
Copy link
Contributor

…view query

What changes were proposed in this pull request?

Fixed owner info

Why are the changes needed?

Owner info incorrect in authorizable events

Does this PR introduce any user-facing change?

No

How was this patch tested?

Remote cluster

Copy link

rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(), desc)));
DDLUtils.addDbAndTableToOutputs(getDatabase(viewName.getDb()), viewName, TableType.VIRTUAL_VIEW, false,
null, outputs);
DDLUtils.addDbAndTableToOutputs(getDatabase(viewName.getDb()), oldView, outputs);
Copy link
Member

@dengzhhu653 dengzhhu653 Sep 29, 2025

Choose a reason for hiding this comment

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

I don't get it, before this fix DDLUtils.addDbAndTableToOutputs will create a dummy table based on viewName, it has the same db and table with the oldView, why it doesn't work before?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The viewName has type TableName, which has dbname and table name. So the HivePrivilegeObject will be constructed with the current user as the owner of the view. This is incorrect behavior.

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