Hive 配置单元通过位置而不是列名访问orc外部表
我正在Hive 配置单元通过位置而不是列名访问orc外部表,hive,presto,orc,Hive,Presto,Orc,我正在HDInsights 4.0上使用hive3.1.0集群 具有相同数据的orc和拼花地板是使用spark创建的,模式为(a string,b int,c string) 创建存储为orc位置的外部表a_st_b_int_d_st_orc(a字符串、b int、d字符串) 从a_stu b_int_d_stu orc中选择* +----+----+------+ | a | b | d | +----+----+------+ | 1 | 2 | abc | | 2 | 3
HDInsights 4.0
上使用hive3.1.0
集群
具有相同数据的orc和拼花地板是使用spark创建的,模式为(a string,b int,c string)
创建存储为orc位置的外部表a_st_b_int_d_st_orc(a字符串、b int、d字符串)
从a_stu b_int_d_stu orc
中选择*
+----+----+------+
| a | b | d |
+----+----+------+
| 1 | 2 | abc |
| 2 | 3 | bcd |
+----+----+------+
创建外部表a_st_b_int_d_st_拼花地板(a字符串,b int,d字符串),存储为拼花地板
位置
从a_st_b_int_d_st_拼花地板中选择*
+----+----+-------+
| a | b | d |
+----+----+-------+
| 1 | 2 | NULL |
| 2 | 3 | NULL |
+----+----+-------+
行为wrt parquet可以使用parquet.column.index.access
进行配置,尽管默认为按名称进行列解析
在Presto中,我们还可以指定hive.orc.use column names=true
如何关闭配置单元中的默认ORC行为?ORC.force.positional.evolution=true如果配置单元3.x上默认,如果禁用,ORC阅读器将基于列名映射而不是索引位置映射行。ORC.force.positional.evolution=true如果配置单元3.x上默认,如果禁用orc,则读卡器将基于列名映射而不是索引位置映射行。
The default behavior of hive native ORC-Reader is that it maps meta-store column names by position with orc files.
There were JIRAs created to map columns by name and reverted as well.