我正在尝试通过连接它的值将作为字符串数组的列转换为字符串,但有些我无法将该特定列作为字符串数组关联:
val converted = jsonFiles.map(line=> {line(7).asInstanceOf[Array[String]] })
converted.collect
我最终得到:
23 年 4 月 11 日 10:40:16 错误 executor.Executor: 阶段 2.0 (TID 5) 中的任务 1.0 中的异常 java.lang.ClassCastException: scala.collection.mutable.ArrayBuffer 无法转换为 [Ljava.lang.String;
我究竟做错了什么 ?
谢谢,
丹尼尔