sc = SparkContext._active_spark_context
_groupConcat = sc._jvm.com.example.udaf.GroupConcat.apply
return Column(_groupConcat(_to_seq(sc, [col], _to_java_column)))
df.groupBy('k').agg(groupConcat('v').alias('vs')).show()
Spark: How to map Python with Scala or Java User Defined Functions?