Apache spark Spark无法读取具有不同架构版本的数据文件的配置单元ORC表

Apache spark Spark无法读取具有不同架构版本的数据文件的配置单元ORC表,apache-spark,hadoop,orc,Apache Spark,Hadoop,Orc,我创建了一个hive ORC分区表,如下所示 create table default.tab_xyz ( wid String, update_at timestamp, type String, id long) PARTITIONED BY ( minorversion string) R

我创建了一个hive ORC分区表,如下所示

create table default.tab_xyz (
wid String,
update_at timestamp,
type String,
id long)
 PARTITIONED BY (                                                                      
   minorversion string)                           
 ROW FORMAT SERDE                                   
   'org.apache.hadoop.hive.ql.io.orc.OrcSerde'      
 STORED AS INPUTFORMAT                              
   'org.apache.hadoop.hive.ql.io.orc.OrcInputFormat'  
 OUTPUTFORMAT                                       
   'org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat'
现在在分区下有两个版本2.1和2.2。当我从版本文件中获取模式时,它如下所示

*2.1版本架构*

wid : String,
type: String,
update_at : timestamp
wid : String,
update_at : timestamp,
type: String,
id : long
*2.2版本架构*

wid : String,
type: String,
update_at : timestamp
wid : String,
update_at : timestamp,
type: String,
id : long
当我执行
从默认值中选择*选项卡xyz
在配置单元中它可以正常工作

但当我这么做的时候
spark.sql(“select*from default.tab_xyz”)
它将我抛出下面的错误
java.lang.ClassCastException:org.apache.hadoop.io.Text无法强制转换为org.apache.orc.mapred.OrcTimestamp
,因为对于2.1版本文件,它需要映射
键入带有
update\u位于表中的

即使模式不同,是否仍可以在spark中处理它以获取所有数据