Hi Andres, I can't find the refrence, last time I searched for that I found that 'percentile_approx' is only available via hive context. You should register a temp table and use it from there.
Best, On Tue, Jun 13, 2017 at 8:52 PM, Andrés Ivaldi <iaiva...@gmail.com> wrote: > Hello, I`m trying to user percentile_approx on my SQL query, but It's > like spark context can´t find the function > > I'm using it like this > import org.apache.spark.sql.functions._ > import org.apache.spark.sql.DataFrameStatFunctions > > val e = expr("percentile_approx(Cantidadcon0234514)") > df.agg(e).show() > > and exception is > > org.apache.spark.sql.AnalysisException: Undefined function: > 'percentile_approx'. This function is neither a registered temporary > function nor a permanent function registered > > I've also tryid with callUDF > > Regards. > > -- > Ing. Ivaldi Andres >