You are most likely confused because you are using the UDF using
HiveContext. In your case, you are using Spark UDF, not Hive UDF. For a
naive scenario, I can use spark UDFs without any hive installation in my
cluster.

sqlContext.udf.register is for UDF in spark. Hive UDFs are stored in Hive
and you can access them hiveContext.sql() method (just think you are
writing the sql in Hive).

HTH...

Ayan

On Thu, Jul 9, 2015 at 2:33 PM, vinod kumar <vinodsachin...@gmail.com>
wrote:

> Hi everyone
>
> Shall we use UDF defined in hive using spark sql?
>
> I've created a UDF in spark and registered it using
> sqlContext.udf.register,but when I restarted a service the UDF was not
> available.
> I've heared that Hive UDF's are permanently stored in hive.(Please Correct
> me if I am wrong).
>
> Thanks,
> Vinod
>



-- 
Best Regards,
Ayan Guha

Reply via email to