配置单元 ORC 上的 Presto 查询错误,无法从 DOUBLE 类型的 ORC 流中读取 SQL 类型实数

Presto query error on hive ORC, Can not read SQL type real from ORC stream of type DOUBLE

我能够运行 快速查询以从 Hive ORC(snappy) table 中读取非浮动列。但是,当我通过 presto cli select 所有浮点数据类型列时,会出现以下错误消息。除了在 targetHive table

中将 filed 类型更改为 double 之外,有什么建议吗?

presto:sample> select * 来自 emp_detail;

查询 20200107_112537_00009_2zpay 失败:打开 Hive 拆分 hdfs 时出错://ip_address/warehouse/tablespace/managed/hive/sample.db/emp_detail/part-00079-5b0c6005-0943-4181-951f-43bcfcfe741f-c000.snappy.orc(偏移量=0,长度=1999857):格式错误的 ORC 文件.无法从 ORC 流 .salary 中读取 SQL 类型的 DOUBLE [hdfs://ip_address/warehouse/tablespace/managed/hive/sample.db/emp_detail/part-00079-5b0c6005-0943-4181-951f-43bcfcfe741f-c000.snappy.orc]

请尝试添加这个属性

hive.orc.use-column-names=true

presto-server/conf/catalog/hive.properties, 并重新启动您的 Presto 服务器。

在不重启服务器的情况下测试它运行 这来自 presto-cli

SET SESSION hive.orc_use_column_names=true;

Presto 关于这些属性的发行说明。