[ 
https://issues.apache.org/jira/browse/HIVE-3964?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mithun Radhakrishnan updated HIVE-3964:
---------------------------------------

    Description: 
The metastore-update script is available now on branch-0.10. (As part of 
HIVE-3931.)

However, the 011-HIVE-3649.oracle.sql script (that updates the SDS table) 
introduces a non-NULL constraint on a new field (that doesn't exist in the old 
schema). The correct way to update the SDS table is as it's done in trunk: 

{{ALTER TABLE  SDS ADD IS_STOREDASSUBDIRECTORIES NUMBER(1) NULL;
UPDATE SDS SET IS_STOREDASSUBDIRECTORIES = 0;
ALTER TABLE SDS MODIFY(IS_STOREDASSUBDIRECTORIES NOT NULL);}}


  was:
upgrade-0.9.0-0.10.0.oracle.sql isn't available in 
metastore/scripts/upgrade/oracle. 

This warrants testing as well. My concern is that 
SDS::IS_STOREDASSUBDIRECTORIES is a new, non-nullable column. Existing rows in 
SDS might need updating with a "default" value (0) before the constraint is 
applied.

I'll post a patch shortly.

    
> HIVE-3649.oracle.sql must update SDS table for IS_STOREDASSUBDIRECTORIES
> ------------------------------------------------------------------------
>
>                 Key: HIVE-3964
>                 URL: https://issues.apache.org/jira/browse/HIVE-3964
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Mithun Radhakrishnan
>            Assignee: Mithun Radhakrishnan
>
> The metastore-update script is available now on branch-0.10. (As part of 
> HIVE-3931.)
> However, the 011-HIVE-3649.oracle.sql script (that updates the SDS table) 
> introduces a non-NULL constraint on a new field (that doesn't exist in the 
> old schema). The correct way to update the SDS table is as it's done in 
> trunk: 
> {{ALTER TABLE  SDS ADD IS_STOREDASSUBDIRECTORIES NUMBER(1) NULL;
> UPDATE SDS SET IS_STOREDASSUBDIRECTORIES = 0;
> ALTER TABLE SDS MODIFY(IS_STOREDASSUBDIRECTORIES NOT NULL);}}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to