配置单元ORC上的Presto查询错误,无法从DOUBLE类型的ORC流中读取真实的SQL类型 [英] Presto query error on hive ORC, Can not read SQL type real from ORC stream of type DOUBLE

查看:282
本文介绍了配置单元ORC上的Presto查询错误,无法从DOUBLE类型的ORC流中读取真实的SQL类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能够预先运行查询以从Hive ORC(snappy)表中读取非浮点列.但是,当我通过presto cli选择所有float数据类型列时,出现以下错误消息.除了将文件类型更改为targetHive表中的double之外,其他任何建议都是可行的选择

I was able to run query in presto to read the non-float columns from Hive ORC(snappy) table. However, when I select all float datatype columns through the presto cli, gives me the below error message. Any suggestions what is the alternative other than changing the filed type to double in the targetHive table

presto:sample>从emp_detail中选择*;

presto:sample> select * from 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文件.无法从DOUBLE类型的[ORDF流.salary]中读取真实的SQL类型[hdfs://ip_address/warehouse/tablespace/managed/hive/sample.db/emp_detail/part-00079-5b0c6005-0943-4181-951f-43bcfcfe741f-c000.snappy.orc]

Query 20200107_112537_00009_2zpay failed: Error opening Hive split hdfs://ip_address/warehouse/tablespace/managed/hive/sample.db/emp_detail/part-00079-5b0c6005-0943-4181-951f-43bcfcfe741f-c000.snappy.orc (offset=0, length=1999857): Malformed ORC file. Can not read SQL type real from ORC stream .salary of type 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服务器.

to presto-server/conf/catalog/hive.properties, and restart your presto server.

要在不重新启动服务器的情况下对其进行测试,请从presto-cli运行此操作

To test it without restarting the server run this from presto-cli

SET SESSION hive.orc_use_column_names=true;

Presto 中发布有关这些属性的注释.

Release notes from Presto regarding these attribute.

这篇关于配置单元ORC上的Presto查询错误,无法从DOUBLE类型的ORC流中读取真实的SQL类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆