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

rajeshbabu commented on PHOENIX-1038:
-------------------------------------

ohh..I have not tested the upgrade from 4.0 to 4.1.I thought it should be fine. 
While merging also some part of this patch has missed.
Now I apply fully and tested. The 1) TableAlreadyExistsException is getting 
thrown properly but when adding new column getting this exception.
{code}
Error: ERROR 1013 (42M04): Table already exists. tableName=SYSTEM.CATALOG 
(state=42M04,code=1013)
org.apache.phoenix.schema.NewerTableAlreadyExistsException: ERROR 1013 (42M04): 
Table already exists. tableName=SYSTEM.CATALOG
        at 
org.apache.phoenix.schema.MetaDataClient.processMutationResult(MetaDataClient.java:1501)
        at 
org.apache.phoenix.schema.MetaDataClient.addColumn(MetaDataClient.java:1753)
        at 
org.apache.phoenix.jdbc.PhoenixStatement$ExecutableAddColumnStatement$1.execute(PhoenixStatement.java:676)
        at 
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:247)
        at 
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:238)
        at 
org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:54)
        at 
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:237)
        at 
org.apache.phoenix.jdbc.PhoenixStatement.executeUpdate(PhoenixStatement.java:943)
        at 
org.apache.phoenix.query.ConnectionQueryServicesImpl.addColumnsIfNotExists(ConnectionQueryServicesImpl.java:1494)
        at 
org.apache.phoenix.query.ConnectionQueryServicesImpl$9.call(ConnectionQueryServicesImpl.java:1558)
        at 
org.apache.phoenix.query.ConnectionQueryServicesImpl$9.call(ConnectionQueryServicesImpl.java:1517)
        at 
org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:54)
        at 
org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:1517)
        at 
org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:131)
        at 
org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.connect(PhoenixEmbeddedDriver.java:112)
        at sqlline.SqlLine$DatabaseConnection.connect(SqlLine.java:4650)
        at sqlline.SqlLine$DatabaseConnection.getConnection(SqlLine.java:4701)
        at sqlline.SqlLine$Commands.connect(SqlLine.java:3942)
        at sqlline.SqlLine$Commands.connect(SqlLine.java:3851)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at sqlline.SqlLine$ReflectiveCommandHandler.execute(SqlLine.java:2810)
        at sqlline.SqlLine.dispatch(SqlLine.java:817)
        at sqlline.SqlLine.initArgs(SqlLine.java:633)
        at sqlline.SqlLine.begin(SqlLine.java:680)
        at sqlline.SqlLine.mainWithInputRedirection(SqlLine.java:441)
        at sqlline.SqlLine.main(SqlLine.java:424)
{code}

[~jamestaylor] can you check this? I need to travel to my hometown urgently. So 
not able to go into details. Otherwise I will check it on Monday. is it ok?

> Dynamically add INDEX_TYPE column to SYSTEM.CATALOG if not already there
> ------------------------------------------------------------------------
>
>                 Key: PHOENIX-1038
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1038
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: rajeshbabu
>            Assignee: rajeshbabu
>             Fix For: 5.0.0, 4.1
>
>         Attachments: PHOENIX-933.patch
>
>
> When a query involves more columns to project than columns in index and query 
> condition involves leading columns in local index then first we can get 
> matching rowkeys from local index table and then get the required columns 
> from data table. In local index both data region and index region co-reside 
> in the same RS, we can call get on data region to get the missing columns in 
> the index, without any n/w overhead. So it's efficient. 



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

Reply via email to