[jira] [Commented] (PHOENIX-5976) Cannot drop a column when the index view is involved

2020-07-20 Thread Hudson (Jira)


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

Hudson commented on PHOENIX-5976:
-

FAILURE: Integrated in Jenkins build PreCommit-PHOENIX-Build #4063 (See 
[https://builds.apache.org/job/PreCommit-PHOENIX-Build/4063/])
PHOENIX-5976 Cannot drop a column when the index view is involved (yanxinyi: 
rev 4c03f087f2c3b562459f5c09814d7eeafc727b11)
* (edit) 
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/DropColumnMutator.java
* (edit) 
phoenix-core/src/it/java/org/apache/phoenix/end2end/index/DropColumnIT.java


> Cannot drop a column when the index view is involved 
> -
>
> Key: PHOENIX-5976
> URL: https://issues.apache.org/jira/browse/PHOENIX-5976
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 4.15.0, 4.16.0
>Reporter: Xinyi Yan
>Assignee: Xinyi Yan
>Priority: Blocker
> Fix For: 4.16.0
>
> Attachments: PHOENIX-5976.4.x.patch, PHOENIX-5976.4.x.v2.patch
>
>
> This is how to reproduce it on the 4.x branch:
> {code:java}
> // create table
> stmt.execute("CREATE TABLE IF NOT EXISTS DUMMY (ID CHAR(10) NOT 
> NULL,KEY_PREFIX CHAR(3) NOT NULL," +
> " CONSTRAINT PK PRIMARY KEY (ID,KEY_PREFIX))");
> // create view
> stmt.execute(
> "CREATE VIEW IF NOT EXISTS DUMMY_VIEW  (PK1 DATE NOT NULL,PK2 
> CHAR(15) NOT NULL," +
> "NON_PK1 CHAR(15),NON_PK2 CHAR(15) CONSTRAINT PKVIEW PRIMARY 
> KEY (PK1,PK2)) " +
> "AS SELECT * FROM DUMMY WHERE KEY_PREFIX = '123'");
> // create index
> stmt.execute("CREATE INDEX DUMMY_INDEX ON DUMMY_VIEW (PK2, PK1) INCLUDE 
> (NON_PK1, NON_PK2)");
> // drop column
> stmt.execute("ALTER VIEW DUMMY_VIEW DROP COLUMN IF EXISTS NON_PK1");
> {code}
> {code:java}
> org.apache.hadoop.hbase.DoNotRetryIOException: ERROR 504 (42703): ERROR 504 
> (42703): Undefined column. columnName=0:NON_PK2 
> DUMMY_VIEWorg.apache.hadoop.hbase.DoNotRetryIOException: ERROR 504 (42703): 
> ERROR 504 (42703): Undefined column. columnName=0:NON_PK2 DUMMY_VIEW at 
> org.apache.phoenix.util.ServerUtil.createIOException(ServerUtil.java:114) at 
> org.apache.phoenix.util.ServerUtil.throwIOException(ServerUtil.java:88) at 
> org.apache.phoenix.coprocessor.MetaDataEndpointImpl.mutateColumn(MetaDataEndpointImpl.java:2823)
>  at 
> org.apache.phoenix.coprocessor.MetaDataEndpointImpl.dropColumn(MetaDataEndpointImpl.java:3026)
>  at 
> org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService.callMethod(MetaDataProtos.java:17253)
>  at 
> org.apache.hadoop.hbase.regionserver.HRegion.execService(HRegion.java:8523) 
> at 
> org.apache.hadoop.hbase.regionserver.RSRpcServices.execServiceOnRegion(RSRpcServices.java:2282)
>  at 
> org.apache.hadoop.hbase.regionserver.RSRpcServices.execService(RSRpcServices.java:2264)
>  at 
> org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:36808)
>  at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2399) at 
> org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:124) at 
> org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:311) at 
> org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:291)Caused
>  by: org.apache.phoenix.schema.ColumnNotFoundException: ERROR 504 (42703): 
> Undefined column. columnName=0:NON_PK2 at 
> org.apache.phoenix.schema.PColumnFamilyImpl.getPColumnForColumnNameBytes(PColumnFamilyImpl.java:86)
>  at org.apache.phoenix.util.MetaDataUtil.getColumn(MetaDataUtil.java:982) at 
> org.apache.phoenix.coprocessor.DropColumnMutator.validateAndAddMetadata(DropColumnMutator.java:184)
>  at 
> org.apache.phoenix.coprocessor.MetaDataEndpointImpl.mutateColumn(MetaDataEndpointImpl.java:2719)
>  ... 10 more
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (PHOENIX-5976) Cannot drop a column when the index view is involved

2020-07-17 Thread Hadoop QA (Jira)


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

Hadoop QA commented on PHOENIX-5976:


{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  
http://issues.apache.org/jira/secure/attachment/13007897/PHOENIX-5976.4.x.v2.patch
  against 4.x branch at commit 28eb6980a668dc3d98d387692aedf7bec863b6c7.
  ATTACHMENT ID: 13007897

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:green}+1 tests included{color}.  The patch appears to include 7 new 
or modified tests.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:red}-1 release audit{color}.  The applied patch generated 1 release 
audit warnings (more than the master's current 0 warnings).

{color:red}-1 lineLengths{color}.  The patch introduces the following lines 
longer than 100:
+" (ID CHAR(10) NOT NULL,KEY_PREFIX CHAR(3) NOT 
NULL, NON_PK1 CHAR(15),NON_PK2 CHAR(15), " +
+"NON_PK1 CHAR(15),NON_PK2 CHAR(15) CONSTRAINT 
PKVIEW PRIMARY KEY (PK1,PK2)) " +
+"NON_PK2 CHAR(15),NON_PK3 CHAR(15) CONSTRAINT 
PKVIEW PRIMARY KEY (PK1,PK2)) " +
+&& Bytes.compareTo(indexTableName, 
rowKeyMetaData[TABLE_NAME_INDEX]) == 0) {

 {color:red}-1 core tests{color}.  The patch failed these unit tests:
 
./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.DropTableWithViewsIT

Test results: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/4054//testReport/
Code Coverage results: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/4054//artifact/phoenix-core/target/site/jacoco/index.html
Release audit warnings: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/4054//artifact/patchprocess/patchReleaseAuditWarnings.txt
Console output: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/4054//console

This message is automatically generated.

> Cannot drop a column when the index view is involved 
> -
>
> Key: PHOENIX-5976
> URL: https://issues.apache.org/jira/browse/PHOENIX-5976
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 4.15.0, 4.16.0
>Reporter: Xinyi Yan
>Assignee: Xinyi Yan
>Priority: Blocker
> Fix For: 4.16.0
>
> Attachments: PHOENIX-5976.4.x.patch, PHOENIX-5976.4.x.v2.patch
>
>
> This is how to reproduce it on the 4.x branch:
> {code:java}
> // create table
> stmt.execute("CREATE TABLE IF NOT EXISTS DUMMY (ID CHAR(10) NOT 
> NULL,KEY_PREFIX CHAR(3) NOT NULL," +
> " CONSTRAINT PK PRIMARY KEY (ID,KEY_PREFIX))");
> // create view
> stmt.execute(
> "CREATE VIEW IF NOT EXISTS DUMMY_VIEW  (PK1 DATE NOT NULL,PK2 
> CHAR(15) NOT NULL," +
> "NON_PK1 CHAR(15),NON_PK2 CHAR(15) CONSTRAINT PKVIEW PRIMARY 
> KEY (PK1,PK2)) " +
> "AS SELECT * FROM DUMMY WHERE KEY_PREFIX = '123'");
> // create index
> stmt.execute("CREATE INDEX DUMMY_INDEX ON DUMMY_VIEW (PK2, PK1) INCLUDE 
> (NON_PK1, NON_PK2)");
> // drop column
> stmt.execute("ALTER VIEW DUMMY_VIEW DROP COLUMN IF EXISTS NON_PK1");
> {code}
> {code:java}
> org.apache.hadoop.hbase.DoNotRetryIOException: ERROR 504 (42703): ERROR 504 
> (42703): Undefined column. columnName=0:NON_PK2 
> DUMMY_VIEWorg.apache.hadoop.hbase.DoNotRetryIOException: ERROR 504 (42703): 
> ERROR 504 (42703): Undefined column. columnName=0:NON_PK2 DUMMY_VIEW at 
> org.apache.phoenix.util.ServerUtil.createIOException(ServerUtil.java:114) at 
> org.apache.phoenix.util.ServerUtil.throwIOException(ServerUtil.java:88) at 
> org.apache.phoenix.coprocessor.MetaDataEndpointImpl.mutateColumn(MetaDataEndpointImpl.java:2823)
>  at 
> org.apache.phoenix.coprocessor.MetaDataEndpointImpl.dropColumn(MetaDataEndpointImpl.java:3026)
>  at 
> org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService.callMethod(MetaDataProtos.java:17253)
>  at 
> org.apache.hadoop.hbase.regionserver.HRegion.execService(HRegion.java:8523) 
> at 
> org.apache.hadoop.hbase.regionserver.RSRpcServices.execServiceOnRegion(RSRpcServices.java:2282)
>  at 
> org.apache.hadoop.hbase.regionserver.RSRpcServices.execService(RSRpcServices.java:2264)
>  at 
> org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:36808)
>  at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2399) at 
> org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:124) at 
> org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:311) at 
> org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:291)Caused
>  by: 

[jira] [Commented] (PHOENIX-5976) Cannot drop a column when the index view is involved

2020-07-16 Thread Hadoop QA (Jira)


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

Hadoop QA commented on PHOENIX-5976:


{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  
http://issues.apache.org/jira/secure/attachment/13007821/PHOENIX-5976.4.x.patch
  against 4.x branch at commit 07f1fea40804a9c65e04e336afbeecab534372e0.
  ATTACHMENT ID: 13007821

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:green}+1 tests included{color}.  The patch appears to include 5 new 
or modified tests.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:red}-1 release audit{color}.  The applied patch generated 1 release 
audit warnings (more than the master's current 0 warnings).

{color:red}-1 lineLengths{color}.  The patch introduces the following lines 
longer than 100:
+stmt.execute("CREATE TABLE IF NOT EXISTS " + table + " (ID 
CHAR(10) NOT NULL,KEY_PREFIX CHAR(3) NOT NULL," +
+"CREATE VIEW IF NOT EXISTS " + view + "  (PK1 DATE NOT 
NULL,PK2 CHAR(15) NOT NULL," +
+"NON_PK1 CHAR(15),NON_PK2 CHAR(15) CONSTRAINT 
PKVIEW PRIMARY KEY (PK1,PK2)) " +
+stmt.execute("CREATE INDEX " + index + " ON " + view + " (PK2, 
PK1) INCLUDE (NON_PK1, NON_PK2)");
+stmt.execute("CREATE TABLE IF NOT EXISTS "  + table + " (ID 
CHAR(10) NOT NULL,KEY_PREFIX CHAR(3) NOT NULL," +
+"CREATE VIEW IF NOT EXISTS "  + view + "  (PK1 DATE 
NOT NULL,PK2 CHAR(15) NOT NULL," +
+"NON_PK1 CHAR(15),NON_PK2 CHAR(15) CONSTRAINT 
PKVIEW PRIMARY KEY (PK1,PK2)) " +
+stmt.execute("CREATE INDEX " + index + " ON " + view + " (PK2, 
PK1) INCLUDE (NON_PK1, NON_PK2)");
+stmt.execute("CREATE TABLE IF NOT EXISTS " + table + " (ID 
CHAR(10) NOT NULL,KEY_PREFIX CHAR(3) NOT NULL, NON_PK1 CHAR(15),NON_PK2 
CHAR(15), " +
+stmt.execute("CREATE INDEX " + index + " ON " + table +" 
(KEY_PREFIX, ID) INCLUDE (NON_PK1, NON_PK2)");

{color:green}+1 core tests{color}.  The patch passed unit tests in .

Test results: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/4051//testReport/
Code Coverage results: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/4051//artifact/phoenix-core/target/site/jacoco/index.html
Release audit warnings: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/4051//artifact/patchprocess/patchReleaseAuditWarnings.txt
Console output: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/4051//console

This message is automatically generated.

> Cannot drop a column when the index view is involved 
> -
>
> Key: PHOENIX-5976
> URL: https://issues.apache.org/jira/browse/PHOENIX-5976
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 4.15.0, 4.16.0
>Reporter: Xinyi Yan
>Assignee: Xinyi Yan
>Priority: Blocker
> Fix For: 4.16.0
>
> Attachments: PHOENIX-5976.4.x.patch
>
>
> This is how to reproduce it on the 4.x branch:
> {code:java}
> // create table
> stmt.execute("CREATE TABLE IF NOT EXISTS DUMMY (ID CHAR(10) NOT 
> NULL,KEY_PREFIX CHAR(3) NOT NULL," +
> " CONSTRAINT PK PRIMARY KEY (ID,KEY_PREFIX))");
> // create view
> stmt.execute(
> "CREATE VIEW IF NOT EXISTS DUMMY_VIEW  (PK1 DATE NOT NULL,PK2 
> CHAR(15) NOT NULL," +
> "NON_PK1 CHAR(15),NON_PK2 CHAR(15) CONSTRAINT PKVIEW PRIMARY 
> KEY (PK1,PK2)) " +
> "AS SELECT * FROM DUMMY WHERE KEY_PREFIX = '123'");
> // create index
> stmt.execute("CREATE INDEX DUMMY_INDEX ON DUMMY_VIEW (PK2, PK1) INCLUDE 
> (NON_PK1, NON_PK2)");
> // drop column
> stmt.execute("ALTER VIEW DUMMY_VIEW DROP COLUMN IF EXISTS NON_PK1");
> {code}
> {code:java}
> org.apache.hadoop.hbase.DoNotRetryIOException: ERROR 504 (42703): ERROR 504 
> (42703): Undefined column. columnName=0:NON_PK2 
> DUMMY_VIEWorg.apache.hadoop.hbase.DoNotRetryIOException: ERROR 504 (42703): 
> ERROR 504 (42703): Undefined column. columnName=0:NON_PK2 DUMMY_VIEW at 
> org.apache.phoenix.util.ServerUtil.createIOException(ServerUtil.java:114) at 
> org.apache.phoenix.util.ServerUtil.throwIOException(ServerUtil.java:88) at 
> org.apache.phoenix.coprocessor.MetaDataEndpointImpl.mutateColumn(MetaDataEndpointImpl.java:2823)
>  at 
> org.apache.phoenix.coprocessor.MetaDataEndpointImpl.dropColumn(MetaDataEndpointImpl.java:3026)
>  at 
> org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService.callMethod(MetaDataProtos.java:17253)
>  at 
> org.apache.hadoop.hbase.regionserver.HRegion.execService(HRegion.java:8523) 
> at 
> 

[jira] [Commented] (PHOENIX-5976) Cannot drop a column when the index view is involved

2020-07-16 Thread Hadoop QA (Jira)


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

Hadoop QA commented on PHOENIX-5976:


{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  
http://issues.apache.org/jira/secure/attachment/13007800/PHOENIX-5976.4.x.patch
  against 4.x branch at commit 07f1fea40804a9c65e04e336afbeecab534372e0.
  ATTACHMENT ID: 13007800

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:green}+1 tests included{color}.  The patch appears to include 5 new 
or modified tests.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:red}-1 release audit{color}.  The applied patch generated 1 release 
audit warnings (more than the master's current 0 warnings).

{color:red}-1 lineLengths{color}.  The patch introduces the following lines 
longer than 100:
+stmt.execute("CREATE TABLE IF NOT EXISTS " + table + " (ID 
CHAR(10) NOT NULL,KEY_PREFIX CHAR(3) NOT NULL," +
+"CREATE VIEW IF NOT EXISTS " + view + "  (PK1 DATE NOT 
NULL,PK2 CHAR(15) NOT NULL," +
+"NON_PK1 CHAR(15),NON_PK2 CHAR(15) CONSTRAINT 
PKVIEW PRIMARY KEY (PK1,PK2)) " +
+stmt.execute("CREATE INDEX " + index + " ON " + view + " (PK2, 
PK1) INCLUDE (NON_PK1, NON_PK2)");
+stmt.execute("CREATE TABLE IF NOT EXISTS "  + table + " (ID 
CHAR(10) NOT NULL,KEY_PREFIX CHAR(3) NOT NULL," +
+"CREATE VIEW IF NOT EXISTS "  + view + "  (PK1 DATE 
NOT NULL,PK2 CHAR(15) NOT NULL," +
+"NON_PK1 CHAR(15),NON_PK2 CHAR(15) CONSTRAINT 
PKVIEW PRIMARY KEY (PK1,PK2)) " +
+stmt.execute("CREATE INDEX " + index + " ON " + view + " (PK2, 
PK1) INCLUDE (NON_PK1, NON_PK2)");
+stmt.execute("CREATE TABLE IF NOT EXISTS " + table + " (ID 
CHAR(10) NOT NULL,KEY_PREFIX CHAR(3) NOT NULL, NON_PK1 CHAR(15),NON_PK2 
CHAR(15), " +
+stmt.execute("CREATE INDEX " + index + " ON " + table +" 
(KEY_PREFIX, ID) INCLUDE (NON_PK1, NON_PK2)");

 {color:red}-1 core tests{color}.  The patch failed these unit tests:
 
./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.DropTableWithViewsIT
./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.query.MaxConcurrentConnectionsIT

Test results: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/4047//testReport/
Code Coverage results: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/4047//artifact/phoenix-core/target/site/jacoco/index.html
Release audit warnings: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/4047//artifact/patchprocess/patchReleaseAuditWarnings.txt
Console output: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/4047//console

This message is automatically generated.

> Cannot drop a column when the index view is involved 
> -
>
> Key: PHOENIX-5976
> URL: https://issues.apache.org/jira/browse/PHOENIX-5976
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 4.15.0, 4.16.0
>Reporter: Xinyi Yan
>Assignee: Xinyi Yan
>Priority: Blocker
> Fix For: 4.16.0
>
> Attachments: PHOENIX-5976.4.x.patch
>
>
> This is how to reproduce it on the 4.x branch:
> {code:java}
> // create table
> stmt.execute("CREATE TABLE IF NOT EXISTS DUMMY (ID CHAR(10) NOT 
> NULL,KEY_PREFIX CHAR(3) NOT NULL," +
> " CONSTRAINT PK PRIMARY KEY (ID,KEY_PREFIX))");
> // create view
> stmt.execute(
> "CREATE VIEW IF NOT EXISTS DUMMY_VIEW  (PK1 DATE NOT NULL,PK2 
> CHAR(15) NOT NULL," +
> "NON_PK1 CHAR(15),NON_PK2 CHAR(15) CONSTRAINT PKVIEW PRIMARY 
> KEY (PK1,PK2)) " +
> "AS SELECT * FROM DUMMY WHERE KEY_PREFIX = '123'");
> // create index
> stmt.execute("CREATE INDEX DUMMY_INDEX ON DUMMY_VIEW (PK2, PK1) INCLUDE 
> (NON_PK1, NON_PK2)");
> // drop column
> stmt.execute("ALTER VIEW DUMMY_VIEW DROP COLUMN IF EXISTS NON_PK1");
> {code}
> {code:java}
> org.apache.hadoop.hbase.DoNotRetryIOException: ERROR 504 (42703): ERROR 504 
> (42703): Undefined column. columnName=0:NON_PK2 
> DUMMY_VIEWorg.apache.hadoop.hbase.DoNotRetryIOException: ERROR 504 (42703): 
> ERROR 504 (42703): Undefined column. columnName=0:NON_PK2 DUMMY_VIEW at 
> org.apache.phoenix.util.ServerUtil.createIOException(ServerUtil.java:114) at 
> org.apache.phoenix.util.ServerUtil.throwIOException(ServerUtil.java:88) at 
> org.apache.phoenix.coprocessor.MetaDataEndpointImpl.mutateColumn(MetaDataEndpointImpl.java:2823)
>  at 
> org.apache.phoenix.coprocessor.MetaDataEndpointImpl.dropColumn(MetaDataEndpointImpl.java:3026)
>  at 
> 

[jira] [Commented] (PHOENIX-5976) Cannot drop a column when the index view is involved

2020-07-15 Thread Hadoop QA (Jira)


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

Hadoop QA commented on PHOENIX-5976:


{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  
http://issues.apache.org/jira/secure/attachment/13007745/PHOENIX-5976.4.x.patch
  against 4.x branch at commit 2fe1dd0f4ea962554443d11d65aa44d9361d888b.
  ATTACHMENT ID: 13007745

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:green}+1 tests included{color}.  The patch appears to include 5 new 
or modified tests.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:red}-1 release audit{color}.  The applied patch generated 1 release 
audit warnings (more than the master's current 0 warnings).

{color:red}-1 lineLengths{color}.  The patch introduces the following lines 
longer than 100:
+stmt.execute("CREATE TABLE IF NOT EXISTS " + table + " (ID 
CHAR(10) NOT NULL,KEY_PREFIX CHAR(3) NOT NULL," +
+"CREATE VIEW IF NOT EXISTS " + view + "  (PK1 DATE NOT 
NULL,PK2 CHAR(15) NOT NULL," +
+"NON_PK1 CHAR(15),NON_PK2 CHAR(15) CONSTRAINT 
PKVIEW PRIMARY KEY (PK1,PK2)) " +
+stmt.execute("CREATE INDEX " + index + " ON " + view + " (PK2, 
PK1) INCLUDE (NON_PK1, NON_PK2)");
+stmt.execute("CREATE TABLE IF NOT EXISTS "  + table + " (ID 
CHAR(10) NOT NULL,KEY_PREFIX CHAR(3) NOT NULL," +
+"CREATE VIEW IF NOT EXISTS "  + view + "  (PK1 DATE 
NOT NULL,PK2 CHAR(15) NOT NULL," +
+"NON_PK1 CHAR(15),NON_PK2 CHAR(15) CONSTRAINT 
PKVIEW PRIMARY KEY (PK1,PK2)) " +
+stmt.execute("CREATE INDEX " + index + " ON " + view + " (PK2, 
PK1) INCLUDE (NON_PK1, NON_PK2)");
+stmt.execute("CREATE TABLE IF NOT EXISTS " + table + " (ID 
CHAR(10) NOT NULL,KEY_PREFIX CHAR(3) NOT NULL, NON_PK1 CHAR(15),NON_PK2 
CHAR(15), " +
+stmt.execute("CREATE INDEX " + index + " ON " + table +" 
(KEY_PREFIX, ID) INCLUDE (NON_PK1, NON_PK2)");

 {color:red}-1 core tests{color}.  The patch failed these unit tests:
 
./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.DropTableWithViewsIT

Test results: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/4045//testReport/
Code Coverage results: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/4045//artifact/phoenix-core/target/site/jacoco/index.html
Release audit warnings: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/4045//artifact/patchprocess/patchReleaseAuditWarnings.txt
Console output: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/4045//console

This message is automatically generated.

> Cannot drop a column when the index view is involved 
> -
>
> Key: PHOENIX-5976
> URL: https://issues.apache.org/jira/browse/PHOENIX-5976
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 4.15.0, 4.16.0
>Reporter: Xinyi Yan
>Assignee: Xinyi Yan
>Priority: Blocker
> Fix For: 4.16.0
>
> Attachments: PHOENIX-5976.4.x.patch
>
>
> This is how to reproduce it on the 4.x branch:
> {code:java}
> // create table
> stmt.execute("CREATE TABLE IF NOT EXISTS DUMMY (ID CHAR(10) NOT 
> NULL,KEY_PREFIX CHAR(3) NOT NULL," +
> " CONSTRAINT PK PRIMARY KEY (ID,KEY_PREFIX))");
> // create view
> stmt.execute(
> "CREATE VIEW IF NOT EXISTS DUMMY_VIEW  (PK1 DATE NOT NULL,PK2 
> CHAR(15) NOT NULL," +
> "NON_PK1 CHAR(15),NON_PK2 CHAR(15) CONSTRAINT PKVIEW PRIMARY 
> KEY (PK1,PK2)) " +
> "AS SELECT * FROM DUMMY WHERE KEY_PREFIX = '123'");
> // create index
> stmt.execute("CREATE INDEX DUMMY_INDEX ON DUMMY_VIEW (PK2, PK1) INCLUDE 
> (NON_PK1, NON_PK2)");
> // drop column
> stmt.execute("ALTER VIEW DUMMY_VIEW DROP COLUMN IF EXISTS NON_PK1");
> {code}
> {code:java}
> org.apache.hadoop.hbase.DoNotRetryIOException: ERROR 504 (42703): ERROR 504 
> (42703): Undefined column. columnName=0:NON_PK2 
> DUMMY_VIEWorg.apache.hadoop.hbase.DoNotRetryIOException: ERROR 504 (42703): 
> ERROR 504 (42703): Undefined column. columnName=0:NON_PK2 DUMMY_VIEW at 
> org.apache.phoenix.util.ServerUtil.createIOException(ServerUtil.java:114) at 
> org.apache.phoenix.util.ServerUtil.throwIOException(ServerUtil.java:88) at 
> org.apache.phoenix.coprocessor.MetaDataEndpointImpl.mutateColumn(MetaDataEndpointImpl.java:2823)
>  at 
> org.apache.phoenix.coprocessor.MetaDataEndpointImpl.dropColumn(MetaDataEndpointImpl.java:3026)
>  at 
> org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService.callMethod(MetaDataProtos.java:17253)
>  at 
> 

[jira] [Commented] (PHOENIX-5976) Cannot drop a column when the index view is involved

2020-07-15 Thread Hadoop QA (Jira)


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

Hadoop QA commented on PHOENIX-5976:


{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  http://issues.apache.org
  against master branch at commit 2fe1dd0f4ea962554443d11d65aa44d9361d888b.
  ATTACHMENT ID: http:

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:green}+0 tests included{color}.  The patch appears to be a 
documentation, build,
or dev patch that doesn't require tests.

{color:red}-1 patch{color}.  The patch command could not apply the patch.

Console output: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/4044//console

This message is automatically generated.

> Cannot drop a column when the index view is involved 
> -
>
> Key: PHOENIX-5976
> URL: https://issues.apache.org/jira/browse/PHOENIX-5976
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 4.15.0, 4.16.0
>Reporter: Xinyi Yan
>Assignee: Xinyi Yan
>Priority: Blocker
> Fix For: 4.16.0
>
> Attachments: PHOENIX-5976
>
>
> This is how to reproduce it on the 4.x branch:
> {code:java}
> // create table
> stmt.execute("CREATE TABLE IF NOT EXISTS DUMMY (ID CHAR(10) NOT 
> NULL,KEY_PREFIX CHAR(3) NOT NULL," +
> " CONSTRAINT PK PRIMARY KEY (ID,KEY_PREFIX))");
> // create view
> stmt.execute(
> "CREATE VIEW IF NOT EXISTS DUMMY_VIEW  (PK1 DATE NOT NULL,PK2 
> CHAR(15) NOT NULL," +
> "NON_PK1 CHAR(15),NON_PK2 CHAR(15) CONSTRAINT PKVIEW PRIMARY 
> KEY (PK1,PK2)) " +
> "AS SELECT * FROM DUMMY WHERE KEY_PREFIX = '123'");
> // create index
> stmt.execute("CREATE INDEX DUMMY_INDEX ON DUMMY_VIEW (PK2, PK1) INCLUDE 
> (NON_PK1, NON_PK2)");
> // drop column
> stmt.execute("ALTER VIEW DUMMY_VIEW DROP COLUMN IF EXISTS NON_PK1");
> {code}
> {code:java}
> org.apache.hadoop.hbase.DoNotRetryIOException: ERROR 504 (42703): ERROR 504 
> (42703): Undefined column. columnName=0:NON_PK2 
> DUMMY_VIEWorg.apache.hadoop.hbase.DoNotRetryIOException: ERROR 504 (42703): 
> ERROR 504 (42703): Undefined column. columnName=0:NON_PK2 DUMMY_VIEW at 
> org.apache.phoenix.util.ServerUtil.createIOException(ServerUtil.java:114) at 
> org.apache.phoenix.util.ServerUtil.throwIOException(ServerUtil.java:88) at 
> org.apache.phoenix.coprocessor.MetaDataEndpointImpl.mutateColumn(MetaDataEndpointImpl.java:2823)
>  at 
> org.apache.phoenix.coprocessor.MetaDataEndpointImpl.dropColumn(MetaDataEndpointImpl.java:3026)
>  at 
> org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService.callMethod(MetaDataProtos.java:17253)
>  at 
> org.apache.hadoop.hbase.regionserver.HRegion.execService(HRegion.java:8523) 
> at 
> org.apache.hadoop.hbase.regionserver.RSRpcServices.execServiceOnRegion(RSRpcServices.java:2282)
>  at 
> org.apache.hadoop.hbase.regionserver.RSRpcServices.execService(RSRpcServices.java:2264)
>  at 
> org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:36808)
>  at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2399) at 
> org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:124) at 
> org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:311) at 
> org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:291)Caused
>  by: org.apache.phoenix.schema.ColumnNotFoundException: ERROR 504 (42703): 
> Undefined column. columnName=0:NON_PK2 at 
> org.apache.phoenix.schema.PColumnFamilyImpl.getPColumnForColumnNameBytes(PColumnFamilyImpl.java:86)
>  at org.apache.phoenix.util.MetaDataUtil.getColumn(MetaDataUtil.java:982) at 
> org.apache.phoenix.coprocessor.DropColumnMutator.validateAndAddMetadata(DropColumnMutator.java:184)
>  at 
> org.apache.phoenix.coprocessor.MetaDataEndpointImpl.mutateColumn(MetaDataEndpointImpl.java:2719)
>  ... 10 more
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (PHOENIX-5976) Cannot drop a column when the index view is involved

2020-07-15 Thread Xinyi Yan (Jira)


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

Xinyi Yan commented on PHOENIX-5976:


Hi [~wangchao316], thanks for looking into this. This issue can be found at the 
4.x branch.

> Cannot drop a column when the index view is involved 
> -
>
> Key: PHOENIX-5976
> URL: https://issues.apache.org/jira/browse/PHOENIX-5976
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 4.15.0, 4.16.0
>Reporter: Xinyi Yan
>Priority: Blocker
> Fix For: 4.16.0
>
>
> This is how to reproduce it on the 4.x branch:
> {code:java}
> // create table
> stmt.execute("CREATE TABLE IF NOT EXISTS DUMMY (ID CHAR(10) NOT 
> NULL,KEY_PREFIX CHAR(3) NOT NULL," +
> " CONSTRAINT PK PRIMARY KEY (ID,KEY_PREFIX))");
> // create view
> stmt.execute(
> "CREATE VIEW IF NOT EXISTS DUMMY_VIEW  (PK1 DATE NOT NULL,PK2 
> CHAR(15) NOT NULL," +
> "NON_PK1 CHAR(15),NON_PK2 CHAR(15) CONSTRAINT PKVIEW PRIMARY 
> KEY (PK1,PK2)) " +
> "AS SELECT * FROM DUMMY WHERE KEY_PREFIX = '123'");
> // create index
> stmt.execute("CREATE INDEX DUMMY_INDEX ON DUMMY_VIEW (PK2, PK1) INCLUDE 
> (NON_PK1, NON_PK2)");
> // drop column
> stmt.execute("ALTER VIEW DUMMY_VIEW DROP COLUMN IF EXISTS NON_PK1");
> {code}
> {code:java}
> org.apache.hadoop.hbase.DoNotRetryIOException: ERROR 504 (42703): ERROR 504 
> (42703): Undefined column. columnName=0:NON_PK2 
> DUMMY_VIEWorg.apache.hadoop.hbase.DoNotRetryIOException: ERROR 504 (42703): 
> ERROR 504 (42703): Undefined column. columnName=0:NON_PK2 DUMMY_VIEW at 
> org.apache.phoenix.util.ServerUtil.createIOException(ServerUtil.java:114) at 
> org.apache.phoenix.util.ServerUtil.throwIOException(ServerUtil.java:88) at 
> org.apache.phoenix.coprocessor.MetaDataEndpointImpl.mutateColumn(MetaDataEndpointImpl.java:2823)
>  at 
> org.apache.phoenix.coprocessor.MetaDataEndpointImpl.dropColumn(MetaDataEndpointImpl.java:3026)
>  at 
> org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService.callMethod(MetaDataProtos.java:17253)
>  at 
> org.apache.hadoop.hbase.regionserver.HRegion.execService(HRegion.java:8523) 
> at 
> org.apache.hadoop.hbase.regionserver.RSRpcServices.execServiceOnRegion(RSRpcServices.java:2282)
>  at 
> org.apache.hadoop.hbase.regionserver.RSRpcServices.execService(RSRpcServices.java:2264)
>  at 
> org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:36808)
>  at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2399) at 
> org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:124) at 
> org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:311) at 
> org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:291)Caused
>  by: org.apache.phoenix.schema.ColumnNotFoundException: ERROR 504 (42703): 
> Undefined column. columnName=0:NON_PK2 at 
> org.apache.phoenix.schema.PColumnFamilyImpl.getPColumnForColumnNameBytes(PColumnFamilyImpl.java:86)
>  at org.apache.phoenix.util.MetaDataUtil.getColumn(MetaDataUtil.java:982) at 
> org.apache.phoenix.coprocessor.DropColumnMutator.validateAndAddMetadata(DropColumnMutator.java:184)
>  at 
> org.apache.phoenix.coprocessor.MetaDataEndpointImpl.mutateColumn(MetaDataEndpointImpl.java:2719)
>  ... 10 more
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (PHOENIX-5976) Cannot drop a column when the index view is involved

2020-06-29 Thread Chao Wang (Jira)


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

Chao Wang commented on PHOENIX-5976:


hello, I try to reproduct in my environment, but there is not this issues in 
4.13.1 and 5.0.0. 

> Cannot drop a column when the index view is involved 
> -
>
> Key: PHOENIX-5976
> URL: https://issues.apache.org/jira/browse/PHOENIX-5976
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 4.15.0, 4.16.0
>Reporter: Xinyi Yan
>Priority: Blocker
> Fix For: 4.16.0
>
>
> This is how to reproduce it on the 4.x branch:
> {code:java}
> // create table
> stmt.execute("CREATE TABLE IF NOT EXISTS DUMMY (ID CHAR(10) NOT 
> NULL,KEY_PREFIX CHAR(3) NOT NULL," +
> " CONSTRAINT PK PRIMARY KEY (ID,KEY_PREFIX))");
> // create view
> stmt.execute(
> "CREATE VIEW IF NOT EXISTS DUMMY_VIEW  (PK1 DATE NOT NULL,PK2 
> CHAR(15) NOT NULL," +
> "NON_PK1 CHAR(15),NON_PK2 CHAR(15) CONSTRAINT PKVIEW PRIMARY 
> KEY (PK1,PK2)) " +
> "AS SELECT * FROM DUMMY WHERE KEY_PREFIX = '123'");
> // create index
> stmt.execute("CREATE INDEX DUMMY_INDEX ON DUMMY_VIEW (PK2, PK1) INCLUDE 
> (NON_PK1, NON_PK2)");
> // drop column
> stmt.execute("ALTER VIEW DUMMY_VIEW DROP COLUMN IF EXISTS NON_PK1");
> {code}
> {code:java}
> org.apache.hadoop.hbase.DoNotRetryIOException: ERROR 504 (42703): ERROR 504 
> (42703): Undefined column. columnName=0:NON_PK2 
> DUMMY_VIEWorg.apache.hadoop.hbase.DoNotRetryIOException: ERROR 504 (42703): 
> ERROR 504 (42703): Undefined column. columnName=0:NON_PK2 DUMMY_VIEW at 
> org.apache.phoenix.util.ServerUtil.createIOException(ServerUtil.java:114) at 
> org.apache.phoenix.util.ServerUtil.throwIOException(ServerUtil.java:88) at 
> org.apache.phoenix.coprocessor.MetaDataEndpointImpl.mutateColumn(MetaDataEndpointImpl.java:2823)
>  at 
> org.apache.phoenix.coprocessor.MetaDataEndpointImpl.dropColumn(MetaDataEndpointImpl.java:3026)
>  at 
> org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService.callMethod(MetaDataProtos.java:17253)
>  at 
> org.apache.hadoop.hbase.regionserver.HRegion.execService(HRegion.java:8523) 
> at 
> org.apache.hadoop.hbase.regionserver.RSRpcServices.execServiceOnRegion(RSRpcServices.java:2282)
>  at 
> org.apache.hadoop.hbase.regionserver.RSRpcServices.execService(RSRpcServices.java:2264)
>  at 
> org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:36808)
>  at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2399) at 
> org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:124) at 
> org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:311) at 
> org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:291)Caused
>  by: org.apache.phoenix.schema.ColumnNotFoundException: ERROR 504 (42703): 
> Undefined column. columnName=0:NON_PK2 at 
> org.apache.phoenix.schema.PColumnFamilyImpl.getPColumnForColumnNameBytes(PColumnFamilyImpl.java:86)
>  at org.apache.phoenix.util.MetaDataUtil.getColumn(MetaDataUtil.java:982) at 
> org.apache.phoenix.coprocessor.DropColumnMutator.validateAndAddMetadata(DropColumnMutator.java:184)
>  at 
> org.apache.phoenix.coprocessor.MetaDataEndpointImpl.mutateColumn(MetaDataEndpointImpl.java:2719)
>  ... 10 more
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)