prestodb / presto

The official home of the Presto distributed SQL query engine for big data
http://prestodb.io
Apache License 2.0
16.06k stars 5.38k forks source link

Select in ORC.Error message:Malformed ORC file #14206

Open wangshengQAQ opened 4 years ago

wangshengQAQ commented 4 years ago

Create ORC table in presto and insert a record.

DROP TABLE
presto:default> create table test (id int) with (format = 'ORC');
CREATE TABLE
presto:default> insert into test values(1);
INSERT: 1 row

When I first queryed this table with beeline.

0: jdbc:hive2://arm15:2181/default> select * from test;
+----------+
| test.id  | 
+----------+
| 1        |
+----------+
1 row selected (0.36 seconds)

when I second queryed this table with beeline.

0: jdbc:hive2://arm15:2181/default> select * from test;
Error: java.io.IOException: java.lang.RuntimeException: ORC split generation failed with exception: Malformed ORC file. Invalid postscript length 17 (state=,code=0)

Now I insert a record in presto once again.

presto:default> insert into test values(2);
INSERT: 1 row

Queryed this table with beeline.

0: jdbc:hive2://arm15:2181/default> select * from test;
+----------+
| test.id  |
+----------+
| 1        |
| 2        |
+----------+
2 rows selected (0.476 seconds)

Anybody tell me why? ths!

gcnote commented 4 years ago

I have the same problem with presto db version 0.232, hive 3.1 how to fix this?

AmarkFox commented 4 years ago

any progress on this issue? Seems presto sql is fixed the issue yet. I have the same problem with presto db