@Dinesh Chitlangia, @Ayoush Agarwal, I think you may be missing the point -- he included "if exists" in his drop function notation. If the function doesn't exist, you shouldn't get an error from the statement, it should silently do nothing. This is similar to `create table if not exists xyz` -- if the table exists, the statement does nothing, if it doesn't exist, you do something. Unfortunately, there's no notation to create function if not exists, and if it does already exist, you'll get an error. The drop function notation does include an "if exists" option which means if you want to safely create a function that may already exist, you can first drop it if it does exist, and then recreate it -- however as Ayoush has demonstrated, due to the issue with the Drop implementation, you can't actually use this approach because the statement throws an exception if the function doesn't exist.
... View more