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

James Taylor commented on PHOENIX-1275:
---------------------------------------

No, it's because you only create the stats table if the sequence table doesn't 
already exist. You'll need to modify the following code in 
ConnectionQueryServicesImpl by having your own try/catch block after the 
creation of the sequence table:
{code}
                            try {
                                metaConnection.createStatement().executeUpdate(
                                        
QueryConstants.CREATE_SEQUENCE_METADATA);

                                // TODO: this doesn't belong in the same try 
block - needs to be it's own.                                
                                metaConnection.createStatement().executeUpdate(
                                        
QueryConstants.CREATE_STATS_TABLE_METADATA);
                            } catch (NewerTableAlreadyExistsException ignore) {
                            } catch (TableAlreadyExistsException ignore) {
                            }
{code}

> SYSTEM.STATS table is not created when SYSTEM.CATALOG is already present
> ------------------------------------------------------------------------
>
>                 Key: PHOENIX-1275
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1275
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 5.0.0, 4.2
>            Reporter: Mujtaba Chohan
>            Assignee: ramkrishna.s.vasudevan
>
> SYSTEM.STATS table is only created if SYSTEM.CATALOG is not present on first 
> Phoenix connection and _analyze <table>_ throws exception of SYSTEM.STATS 
> table not found in case when Phoenix is initialized with SYSTEM.CATALOG 
> already present.



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

Reply via email to