我有一些数据框,我使用下面的代码保存该数据框
df.write.orc("file:///home/test/path/orc")
保存成功,不会出现任何错误,但是当我使用
阅读此内容时df1=spark.read.orc("file:///home/test/path/orc")
以下是错误
Traceback (most recent call last):
File "/home/user1/soft/spark/spark-2.3.1-bin-hadoop2.7/python/lib/pyspark.zip/pyspark/sql/utils.py", line 63, in deco
File "/home/user1/soft/spark/spark-2.3.1-bin-hadoop2.7/python/lib/py4j-0.10.7-src.zip/py4j/protocol.py", line 328, in get_return_value
py4j.protocol.Py4JJavaError: An error occurred while calling o24.orc.
: org.apache.spark.sql.catalyst.parser.ParseException:
mismatched input '.' expecting ':'(line 1, pos 515)
== SQL ==
但是如果我使用实木复合地板格式保存并读取它,效果很好
df.write.parquet("file:///home/test/path/parquet")
df1=spark.read.parquet("file:///home/test/path/parquet")