spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From issues solution <issues.solut...@gmail.com>
Subject Re: java.lang.java.lang.UnsupportedOperationException
Date Wed, 19 Apr 2017 12:13:29 GMT
Pyspark 1.6  On cloudera 5.5  (yearn)

2017-04-19 13:42 GMT+02:00 issues solution <issues.solution@gmail.com>:

> Hi ,
> somone can tell  me why i get the folowing error  with udf apply  like udf
>
> def replaceCempty(x):
>     if x is None :
>         return ""
>     else :
>         return x.encode('utf-8')
> udf_replaceCempty = F.udf(replaceCempty,StringType())
>
> dfTotaleNormalize53 = dfTotaleNormalize52.select([i if i not in
> colprocessing  else  udf_replaceCempty(F.col(i)).alias(i) for i in
> dfTotaleNormalize52.columns])
>
>
> java.lang.java.lang.UnsupportedOperationException
>
>  Cannot evaluate expression: PythonUDF#replaceCempty(input[77,string])
>
> ??
> regards
>
>
>
>

Mime
View raw message