Reply
Highlighted
Explorer
Posts: 22
Registered: ‎08-11-2014

DROP FUNCTION IF EXISTS udf_... fails with "function udf_... dows not exists"

hi

In our application (java code) we're running:

DROP FUNCTION IF EXISTS udf_for_STORE_AGENT_VISIT

and we still get:

2019-06-26 13:49:25,683 ERROR org.apache.hadoop.hive.ql.exec.Task: [HiveServer2-Background-Pool: Thread-6397]: FAILED: error during drop function: org.apache.hadoop.hive.ql.metadata.HiveException: NoSuchObjectException(message:Function udf_for_STORE_AGENT_VISIT does not exist)

 

shouldn't the error be skipped if we have the "IF EXISTS" in the command?

cluster is CDH 5.16.1

 

Thanks

Doron

Cloudera Employee
Posts: 824
Registered: ‎03-23-2015

Re: DROP FUNCTION IF EXISTS udf_... fails with "function udf_... dows not exists"

@doronve,

Have you tried from beeline and still the same error?

Please also suggest the version of JDBC driver that you are using and if it is Cloudera Hive JDBC driver?

Cheers
Eric
Explorer
Posts: 22
Registered: ‎08-11-2014

Re: DROP FUNCTION IF EXISTS udf_... fails with "function udf_... dows not exists"

thanks for the response.
the error occured from java - but not from hive cli (and I did not check beelonw)
recently we moved from Oracle JDK to OpenJDK - could this be an issue?
for now I've added hive.exec.drop.ignorenonexistent and it seems to help