You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Jeffrey Zhong (JIRA)" <ji...@apache.org> on 2014/07/16 22:57:04 UTC

[jira] [Created] (PHOENIX-1095) Cannot add column to SYSTEM.CATALOG using Alter Table

Jeffrey Zhong created PHOENIX-1095:
--------------------------------------

             Summary: Cannot add column to SYSTEM.CATALOG using Alter Table 
                 Key: PHOENIX-1095
                 URL: https://issues.apache.org/jira/browse/PHOENIX-1095
             Project: Phoenix
          Issue Type: Bug
            Reporter: Jeffrey Zhong
            Assignee: Jeffrey Zhong


When using ALTER TABLE command to extend SYSTEM.CATALOG table(this would happen when creating features to store more stats in CATALOG table like Phoenix-950, Phoenix-1038), you will get following error:
{noformat}
org.apache.phoenix.schema.TableNotFoundException: ERROR 1012 (42M03): Table undefined. tableName=CATALOG
{noformat}

This is due to Alter Table statement after SQL parsing will use PTableType.TABLE for table SYSTEM.CATALOG while the following check will fail during MetaDataEndpointImpl#mutateColumn update
{noformat}
                    if (type != expectedType) {
                        return new MetaDataMutationResult(MutationCode.TABLE_NOT_FOUND, EnvironmentEdgeManager.currentTimeMillis(), null);
                    }
{noformat}
  



--
This message was sent by Atlassian JIRA
(v6.2#6252)