[ https://issues.apache.org/jira/browse/HIVE-2510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13132823#comment-13132823 ]
Ashutosh Chauhan commented on HIVE-2510: ---------------------------------------- Sigh. I typed in my reply yesterday but lost it when jira went down : ( Semantic Analyzer creates tasks which are then later executed in Driver::execute() In this case DDLTask gets created. Actual execution of this happens in HiveMetaStore::create_table_core() Apart from CTAS, it never make sense to do it twice, since metastore operation is the only thing happening in create table statement. For CTAS, it has already been special cased, where it make such a check in Semantic Analysis. NPE arises because Hive::getDatabases swallows NoSuchObjectException and instead returns null. We can either fix that so that it throws the exception or can check for null at the time of usage. > Hive throws Null Pointer Exception upon CREATE TABLE <db_name>.<table_name> > .... if the given <db_name> doesn't exist > ------------------------------------------------------------------------------------------------------------------------- > > Key: HIVE-2510 > URL: https://issues.apache.org/jira/browse/HIVE-2510 > Project: Hive > Issue Type: Bug > Reporter: Robert Surówka > Assignee: Robert Surówka > Priority: Trivial > Attachments: HIVE-2510.1.patch, HIVE-2510.2.patch, HIVE-2510.3.patch > > -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira