spark.sql.parquet.writeLegacyFormat:ParquetDecodingException: Can not read value at 0 in block -1 in-CSDN博客

网站介绍:文章浏览阅读2.6k次,点赞2次,收藏5次。系列二在此之前可以先阅读文章:SparkSQL与Hive metastore Parquet转换在说问题之前首先了解一个参数spark.sql.parquet.writeLegacyFormat(默认false)的作用:设置为true时,数据会以Spark1.4和更早的版本的格式写入。比如decimal类型的值会被以Apache Parquet的fixed-length byte array格式写出,该格式是其他系统例如Hive、Impala等使用的。设置为false时,会使用parquet的新版格_spark.sql.parquet.writelegacyformat