Re: apply UDFs to N columns dynamically in dataframe

2017-03-15 Thread Yong Zhang
Is the answer here good for your case? http://stackoverflow.com/questions/33151866/spark-udf-with-varargs [https://cdn.sstatic.net/Sites/stackoverflow/img/apple-touch-i...@2.png?v=73d79a89bded] scala - Spark UDF with varargs -

Re: apply UDFs to N columns dynamically in dataframe

2017-03-15 Thread Hongdi Ren
Since N is decided at runtime, the first idea come to my mind is transform the columns into one vector column (VectorIndexer can do that) and then let udf handle the vector. Just like many ml transformers do. From: anup ahire Date: Wednesday, March 15, 2017 at 2:04 PM To: Subject: apply UDF