- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
ClassCastException on Drop table query in apache spark hive
- Labels:
-
Apache Hadoop
-
Apache Hive
-
Apache Spark
Created ‎07-26-2016 10:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using the following hive query :
and am getting the following exception :
I saw there have been similar posts here and here but they haven't had any response till now. Whats intriguing is that this is specific when we try to use drop table (or drop table if exists) query. Hoping to find resolution for the same. |
Created ‎07-28-2016 02:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
user is a reserved word in hive. You need to use escape characters for it. They are the back ticks, e.g. `user`. Since you are passing the statement as a string, you may have to escape the back-tick ` as well using a back-slash, \`.
Additionally, commands issued in hive require a semi-colon at the end.
To test the above theory just try to drop a table that does not have a reserved keyword in hive, e.g. MyTable.
Created ‎07-28-2016 02:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
user is a reserved word in hive. You need to use escape characters for it. They are the back ticks, e.g. `user`. Since you are passing the statement as a string, you may have to escape the back-tick ` as well using a back-slash, \`.
Additionally, commands issued in hive require a semi-colon at the end.
To test the above theory just try to drop a table that does not have a reserved keyword in hive, e.g. MyTable.
