hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jiraposter@reviews.apache.org (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-2510) Hive throws Null Pointer Exception upon CREATE TABLE <db_name>.<table_name> .... if the given <db_name> doesn't exist
Date Tue, 25 Oct 2011 21:48:33 GMT

    [ https://issues.apache.org/jira/browse/HIVE-2510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13135455#comment-13135455
] 

jiraposter@reviews.apache.org commented on HIVE-2510:
-----------------------------------------------------



bq.  On 2011-10-25 17:24:41, Ashutosh Chauhan wrote:
bq.  > trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java, lines 6923-6926
bq.  > <https://reviews.apache.org/r/2426/diff/4/?file=52450#file52450line6923>
bq.  >
bq.  >     Not sure if we need this. Checking of existing table already happens in analyzeCreateTable()
around line 7847. So, this check at this point is redundant.
bq.  
bq.  Robert Surówka wrote:
bq.      Without this check a null pointer exception was being thrown (for table created as
select).

(Here I check for existing database, not table)


- Robert


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/2426/#review2823
-----------------------------------------------------------


On 2011-10-25 19:25:02, Robert Surówka wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/2426/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2011-10-25 19:25:02)
bq.  
bq.  
bq.  Review request for Yongqiang He, Ning Zhang and Kevin Wilfong.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Now when creating table in specific database, if that database doesn't exist Hive will
return an error informing about that, instead of throwing Null Pointer Exception. Null Pointer
happens during semantic analysis, so it seems reasonable to return an error before the code
that would throw null pointer (Warehouse.getDatabasePath()) executes.
bq.  
bq.  
bq.  This addresses bug HIVE-2510.
bq.      https://issues.apache.org/jira/browse/HIVE-2510
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java 1187647

bq.    trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 1187647 
bq.    trunk/ql/src/test/queries/clientnegative/create_table_failure1.q PRE-CREATION 
bq.    trunk/ql/src/test/queries/clientnegative/create_table_failure2.q PRE-CREATION 
bq.    trunk/ql/src/test/queries/clientnegative/create_table_failure3.q PRE-CREATION 
bq.    trunk/ql/src/test/queries/clientnegative/create_table_failure4.q PRE-CREATION 
bq.    trunk/ql/src/test/queries/clientpositive/input45.q PRE-CREATION 
bq.    trunk/ql/src/test/results/clientnegative/create_table_failure1.q.out PRE-CREATION 
bq.    trunk/ql/src/test/results/clientnegative/create_table_failure2.q.out PRE-CREATION 
bq.    trunk/ql/src/test/results/clientnegative/create_table_failure3.q.out PRE-CREATION 
bq.    trunk/ql/src/test/results/clientnegative/create_table_failure4.q.out PRE-CREATION 
bq.    trunk/ql/src/test/results/clientpositive/input45.q.out PRE-CREATION 
bq.  
bq.  Diff: https://reviews.apache.org/r/2426/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Run some sample queries and it seemed to work. 
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Robert
bq.  
bq.


                
> 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, HIVE-2510.4.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

       

Mime
View raw message