[
https://issues.apache.org/jira/browse/HIVE-27116?focusedWorklogId=849734&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-849734
]
ASF GitHub Bot logged work on HIVE-27116:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 08/Mar/23 04:33
Start Date: 08/Mar/23 04:33
Worklog Time Spent: 10m
Work Description: saihemanth-cloudera commented on code in PR #4092:
URL: https://github.com/apache/hive/pull/4092#discussion_r1128964275
##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/function/AbstractFunctionAnalyzer.java:
##########
@@ -66,11 +70,24 @@ protected void addEntities(String functionName, String
className, boolean isTemp
}
if (database != null) {
outputs.add(new WriteEntity(database,
WriteEntity.WriteType.DDL_NO_LOCK));
+ // Add the permanent function as a WriteEntity
+ Function function;
+ if (isCreate) {
+ function = new Function(functionName, database.getName(), className,
+ SessionState.getUserFromAuthenticator(), PrincipalType.USER,
+ (int) (System.currentTimeMillis() / 1000), FunctionType.JAVA,
resources);
+ } else {
+ try {
+ function = db.getFunction(database.getName(), functionName);
Review Comment:
Yeah that's correct
Issue Time Tracking
-------------------
Worklog Id: (was: 849734)
Time Spent: 2h 10m (was: 2h)
> HS2 need to send owner info for UDFs in the HivePrivilegeObject for
> authorization
> ---------------------------------------------------------------------------------
>
> Key: HIVE-27116
> URL: https://issues.apache.org/jira/browse/HIVE-27116
> Project: Hive
> Issue Type: Bug
> Components: HiveServer2, Security
> Reporter: Sai Hemanth Gantasala
> Assignee: Sai Hemanth Gantasala
> Priority: Major
> Labels: pull-request-available
> Time Spent: 2h 10m
> Remaining Estimate: 0h
>
> UDFs (Functions) of HivePrivilegeObject should have owner info for
> authorization.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)