爆炸结构数组,spark-sql 为 orc 文件格式返回 null

问题描述

我有一个ORC 文件格式存储数据的外部表。当我尝试从表中分解 array<struct> 字段时,它返回空值

解决方法

spark.sql.hive.convertMetastoreOrc=false

对我有用

https://spark.apache.org/docs/latest/configuration.html