Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Hive 1.2.x - CTAS behavior when using CAST to specify type

avatar

As per this JIRA HIVE-11217, there was a bug in Hive where a CTAS statement having NULL in select clause throws IllegalArgumentException:Unknown primitive type VOID.

The bug was fixed and patched in version 1.3.0 and 2.0.0 as per the JIRA and the solution was to use CAST to specify a type when having NULL in select clause.

If I am using Hive 1.2.x and my CTAS select clause has "CAST(null as bigint)" will it still throw

IllegalArgumentException:Unknown primitive type VOID ?

1 ACCEPTED SOLUTION

avatar
Super Collaborator

Try using CAST, then it should not throw any exception and should work fine

View solution in original post

1 REPLY 1

avatar
Super Collaborator

Try using CAST, then it should not throw any exception and should work fine