You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Rajeshbabu Chintaguntla (JIRA)" <ji...@apache.org> on 2018/01/23 13:36:00 UTC

[jira] [Created] (PHOENIX-4551) Possible ColumnAlreadyExistsException is thrown from delete when autocommit off

Rajeshbabu Chintaguntla created PHOENIX-4551:
------------------------------------------------

             Summary: Possible ColumnAlreadyExistsException is thrown from delete when autocommit off
                 Key: PHOENIX-4551
                 URL: https://issues.apache.org/jira/browse/PHOENIX-4551
             Project: Phoenix
          Issue Type: Bug
            Reporter: Rajeshbabu Chintaguntla
            Assignee: Rajeshbabu Chintaguntla
             Fix For: 5.0.0


Here are the simple steps to reproduce it.

{noformat}

0: jdbc:phoenix:localhost> CREATE TABLE IF NOT EXISTS A (a INTEGER PRIMARY KEY,b UNSIGNED_INT,c BIGINT);

No rows affected (2.3 seconds)

0: jdbc:phoenix:localhost> CREATE INDEX idx_global ON A (c);

No rows affected (7.282 seconds)

0: jdbc:phoenix:localhost> CREATE LOCAL INDEX idx_local ON A (c);

No rows affected (11.322 seconds)

0: jdbc:phoenix:localhost> !autocommit off

*Autocommit status: false*

0: jdbc:phoenix:localhost> delete from A where a > 5;

*Error: ERROR 514 (42892): A duplicate column name was detected in the object definition or ALTER TABLE/VIEW statement. columnName=A.C (state=42892,code=514)*

org.apache.phoenix.schema.ColumnAlreadyExistsException: ERROR 514 (42892): A duplicate column name was detected in the object definition or ALTER TABLE/VIEW statement. columnName=A.C

 at org.apache.phoenix.schema.PTableImpl.init(PTableImpl.java:529)

 at org.apache.phoenix.schema.PTableImpl.<init>(PTableImpl.java:421)

 at org.apache.phoenix.schema.PTableImpl.makePTable(PTableImpl.java:305)

 at org.apache.phoenix.compile.DeleteCompiler.compile(DeleteCompiler.java:730)

 at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableDeleteStatement.compilePlan(PhoenixStatement.java:771)

 at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableDeleteStatement.compilePlan(PhoenixStatement.java:759)

 at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:387)

 at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:377)

 at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)

 at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:376)

 at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:364)

 at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1738)

 at sqlline.Commands.execute(Commands.java:822)

 at sqlline.Commands.sql(Commands.java:732)

 at sqlline.SqlLine.dispatch(SqlLine.java:813)

 at sqlline.SqlLine.begin(SqlLine.java:686)

 at sqlline.SqlLine.start(SqlLine.java:398)

 at sqlline.SqlLine.main(SqlLine.java:291)

0: jdbc:phoenix:localhost> 

{noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)