Common Java Errors

Here’s a common error which we’ve seen several times:


Failed with exception cannot be cast to


There’s an issue with doing a “show create table” and then executing the resulting “create table” statement if the table is ORC.

When you do the “show create table”, you get this:






But if you create the table with those clauses, you will then get the casting error when selecting.  To fix this, you need to change your “create table” statement to just this:

               STORED AS ORC