소프트웨어 개발/Scala - Functional

scala collect list scala

늘근이 2018. 6. 29. 19:49
A.join(B, Seq("id"), "left").orderBy("id").groupBy("id", "name").agg(concat_ws(" ", collect_list("text")) as "texts")


concat string into single column using agg


collect_list returns array<string> in that case,

so if you want to use it inside the udf definition, you should take as Seq[String}