[ https://issues.apache.org/jira/browse/PHOENIX-4551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16336002#comment-16336002 ]
James Taylor commented on PHOENIX-4551: --------------------------------------- +1. Thanks, [~rajeshbabu]! > 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: Romil Choksi > Assignee: Rajeshbabu Chintaguntla > Priority: Major > Fix For: 5.0.0, 4.14.0 > > Attachments: PHOENIX-4551.patch > > > 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)