Also, if I'm reading correctly, it looks like you're calling "callUdf" when
what you probably want is "callUDF" (notice the subtle capitalization
difference). Docs:
https://spark.apache.org/docs/latest/api/java/org/apache/spark/sql/functions.html#callUDF(java.lang.String,%20org.apache.spark.sql.Column..
.)

On Mon, Dec 28, 2015 at 10:48 AM Hamel Kothari <hamelkoth...@gmail.com>
wrote:

> Would you mind sharing more of your code? I can't really see the code that
> well from the attached screenshot but it appears that "Lit" is capitalized.
> Not sure what this method actually refers to but the definition in
> functions.scala is lowercased.
>
> Even if that's not it, some more code would be helpful to solving this.
> Also, since it's a compilation error, if you could share the compilation
> error that would be very useful.
>
> -Hamel
>
> On Mon, Dec 28, 2015 at 10:26 AM unk1102 <umesh.ka...@gmail.com> wrote:
>
>> <
>> http://apache-spark-user-list.1001560.n3.nabble.com/file/n25821/Screen_Shot_2015-12-28_at_8.jpg
>> >
>>
>> Hi I am trying to invoke Hive UDF using
>> dataframe.select(callUdf("percentile_approx",col("C1"),lit(0.25))) but it
>> does not compile however same call works in Spark scala console I dont
>> understand why. I am using Spark 1.5.2 maven source in my Java code. I
>> have
>> also explicitly added maven dependency hive-exec-1.2.1.spark.jar where
>> percentile_approx is located but still does not compile code please check
>> attached code image. Please guide. Thanks in advance.
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-spark-user-list.1001560.n3.nabble.com/Spark-DataFrame-callUdf-does-not-compile-tp25821.html
>> Sent from the Apache Spark User List mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
>> For additional commands, e-mail: user-h...@spark.apache.org
>>
>>

Reply via email to