我在Spark中使用scala有一个数据框,它有一个我需要拆分的列.
scala> test.show
+-------------+
|columnToSplit|
+-------------+
| a.b.c|
| d.e.f|
+-------------+
Run Code Online (Sandbox Code Playgroud)
我需要将此列拆分为如下所示:
+--------------+
|col1|col2|col3|
| a| b| c|
| d| e| f|
+--------------+
Run Code Online (Sandbox Code Playgroud)
我正在使用Spark 2.0.0
谢谢