Re: The spark hive udf can read broadcast the variables?

2016-12-18 Thread Takeshi Yamamuro
Hi, No, you can't. If you use ScalaUdf, you can like this; val bv = sc.broadcast(100) val testUdf = udf { (i: Long) => i + bv.value } spark.range(10).select(testUdf('id)).show // maropu On Sun, Dec 18, 2016 at 12:24 AM, 李斌松 <libinsong1...@gmail.com> wrote: > The spark hive

The spark hive udf can read broadcast the variables?

2016-12-17 Thread 李斌松
The spark hive udf can read broadcast the variables?