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

Ashutosh Chauhan commented on HIVE-8863:
----------------------------------------

Patch looks good. But it seems we might have problem for partitioned table as 
well, looking at ObjectStore::deletePartitionColumnStatistics() which looks 
like suffer from same casing problem
{code}
   mStatsObj = 
(MPartitionColumnStatistics)query.executeWithArray(partName.trim(),
                                                dbName.trim(), 
tableName.trim(), colName.trim());
{code}
Can you test dropping a particular partition of a table which has statistics as 
well as dropping a partition table altogether?

> Cannot drop table with uppercase name after "compute statistics for columns"
> ----------------------------------------------------------------------------
>
>                 Key: HIVE-8863
>                 URL: https://issues.apache.org/jira/browse/HIVE-8863
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore
>            Reporter: Juan Yu
>            Assignee: Chaoyu Tang
>         Attachments: HIVE-8863.patch
>
>
> Create a table with uppercase name Test,
> run "analyze table Test compute statistics for columns col1"
> After this, you cannot drop the table by
> drop table Test;
> Got error:
> NestedThrowablesStackTrace: 
> java.sql.BatchUpdateException: Cannot delete or update a parent row: a 
> foreign key constraint fails ("hive2"."TAB_COL_STATS", CONSTRAINT 
> "TAB_COL_STATS_FK" FOREIGN KEY ("TBL_ID") REFERENCES "TBLS" ("TBL_ID")) 
> workaround is to use lowercase table name
> drop table test;



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to