You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Igor Berman <ig...@gmail.com> on 2016/05/08 16:49:52 UTC

different SqlContext with same udf name with different meaning

Hi,
suppose I have multitenant environment and I want to give my users
additional functions
but for each user/tenant the meaning of same function is dependent on
user's specific configuration

is it possible to register same function several times under different
SqlContexts?
are several SqlContexts can live together?


thanks in advance



something like :

SQLContext sqlContext = new org.apache.spark.sql.SQLContext(sc)

sqlContext.udf().register("my_function", func1...);


SQLContext sqlContext2 = new org.apache.spark.sql.SQLContext(sc)

sqlContext2.udf().register("my_function", func2...);