title: Spark UDF with varargs
body: <p>Is it an only option to list all the arguments up to 22 as shown in documentation?</p>
  
  <p><a href="https://spark.apache.org/docs/1.5.0/api/scala/index.html#org.apache.spark.sql.UDFRegistration" rel="noreferrer">https://spark.apache.org/docs/1.5.0/api/scala/index.html#org.apache.spark.sql.UDFRegistration</a></p>
  
  <p>Anyone figured out how to do something similar to this? </p>
  
  <pre><code>sc.udf.register("func", (s: String*) =&gt; s......
  </code></pre>
  
  <p>(writing custom concat function that skips nulls, had to 2 arguments at the time)</p>
  
  <p>Thanks</p>