Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Presto - Inclusion of varchar(64), etc. in Hive table causes error #896

Closed
FiredrakeRAGE opened this issue Dec 5, 2013 · 1 comment
Closed

Comments

@FiredrakeRAGE
Copy link

I have an HDFS/Hive instance set up using MySQL as a metastore.

Running the following version of Hadoop: hadoop-1.2.1
Running the following version of Hive: hive-0.12.0
Running the following version of Presto Server: presto-server-0.54
Running the following version of Discovery Server: discovery-server-1.16
Using the following Presto CLI: presto-cli-0.54-executable.jar

I have a Hive Table created as follows:

[localhost:10001] hive> describe stats;
A int                     None
B smallint             None
C tinyint               None
D tinyint                None
E varchar(64)         None
F smallint                None
G int                     None
H bigint                  None
I int                     None
J bigint                  None
K int                     None
L bigint                  None
hour                    int                     None

# Partition Information
# col_name              data_type               comment

hour                    int                     None

The table appears to work well in Hive. It is correctly populated with data. However, when I attempt to query the table via Presto, I see errors:

presto:default> describe stats;

Query 20131205_215319_00040_y5j69, FAILED, 1 node
Splits: 2 total, 0 done (0.00%)
0:00 [0 rows, 0B] [0 rows/s, 0B/s]

Query 20131205_215319_00040_y5j69 failed: MetaException(message:java.lang.IllegalArgumentException Error: type expected at the position 29 of 'int:smallint:tinyint:tinyint:varchar(64):smallint:int:bigint:int:bigint:int:bigint' but 'varchar' is found.)

presto:default> select count(1) from stats;
Query 20131205_215340_00041_y5j69 failed: MetaException(message:java.lang.IllegalArgumentException Error: type expected at the position 29 of 'int:smallint:tinyint:tinyint:varchar(64):smallint:int:bigint:int:bigint:int:bigint' but 'varchar' is found.)

There is not a lot of debug information:

2013-12-05T21:54:59.748+0000    DEBUG   query-scheduler-33      com.facebook.presto.execution.QueryStateMachine Query 20131205_215459_00042_y5j69 is PLANNING
2013-12-05T21:54:59.749+0000    DEBUG   query-scheduler-34      com.facebook.presto.execution.QueryStateMachine Query 20131205_215459_00042_y5j69 is FAILED

Presto appears to work correctly with tables that do not contain 'varchar' types:

presto:default> select count(1) from other_stats;

 _col0
-------
  2916
(1 row)

Query 20131205_224304_00043_y5j69, FINISHED, 1 node
Splits: 730 total, 730 done (100.00%)
0:05 [2.92K rows, 102KB] [563 rows/s, 19.7KB/s]

Does Presto not support 'varchar' field types?

@FiredrakeRAGE
Copy link
Author

Issue is that Presto is not compatible with Hive > 0.10.0. Varchar introduced with 0.12.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant