文件的路径有空格。Spark正在用%20替换空白。true").option("inferSchema", "true").option("delimiter", delimiter).load(filename)
因此,当执行tmpDF.show(10)方法时,将引发以下错误:
java.io.FileNotFoundException: No such file or directory: s3://
当没有指定模式并将其推断留给Spark时,Spark为什么会显示nullable = true?// shows nullable = true for fields which are present in all JSON records.在遍历类时,可以看到对于StructType,显式可空设置为true。PS: