[jira] [Updated] (PHOENIX-6447) Add support for SYSTEM.CHILD_LINK table in systemcatalogwalentryfilter

2021-04-26 Thread Sandeep Pal (Jira)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-6447?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sandeep Pal updated PHOENIX-6447:
-
Fix Version/s: 5.2.0

> Add support for SYSTEM.CHILD_LINK table in systemcatalogwalentryfilter
> --
>
> Key: PHOENIX-6447
> URL: https://issues.apache.org/jira/browse/PHOENIX-6447
> Project: Phoenix
>  Issue Type: Bug
>  Components: core
>Reporter: Sandeep Pal
>Assignee: Sandeep Pal
>Priority: Major
> Fix For: 4.16.0, 5.2.0
>
>
> In order to replicate system tables, we have a special filter for system 
> catalog table to just replicate tenant owner data in order NOT to mess up the 
> system catalog at the sink cluster. In 4.16, there is a new table getting 
> added (SYSTEM.CHILD_LINK) which will not be replicated completely from our 
> existing filter. 



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


[jira] [Resolved] (PHOENIX-6447) Add support for SYSTEM.CHILD_LINK table in systemcatalogwalentryfilter

2021-04-26 Thread Sandeep Pal (Jira)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-6447?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sandeep Pal resolved PHOENIX-6447.
--
Resolution: Fixed

> Add support for SYSTEM.CHILD_LINK table in systemcatalogwalentryfilter
> --
>
> Key: PHOENIX-6447
> URL: https://issues.apache.org/jira/browse/PHOENIX-6447
> Project: Phoenix
>  Issue Type: Bug
>  Components: core
>Reporter: Sandeep Pal
>Assignee: Sandeep Pal
>Priority: Major
> Fix For: 5.2.0, 4.16.0
>
>
> In order to replicate system tables, we have a special filter for system 
> catalog table to just replicate tenant owner data in order NOT to mess up the 
> system catalog at the sink cluster. In 4.16, there is a new table getting 
> added (SYSTEM.CHILD_LINK) which will not be replicated completely from our 
> existing filter. 



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


[jira] [Updated] (PHOENIX-6447) Add support for SYSTEM.CHILD_LINK table in systemcatalogwalentryfilter

2021-04-23 Thread Sandeep Pal (Jira)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-6447?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sandeep Pal updated PHOENIX-6447:
-
Description: In order to replicate system tables, we have a special filter 
for system catalog table to just replicate tenant owner data in order NOT to 
mess up the system catalog at the sink cluster. In 4.16, there is a new table 
getting added (SYSTEM.CHILD_LINK) which will not be replicated completely from 
our existing filter. 

> Add support for SYSTEM.CHILD_LINK table in systemcatalogwalentryfilter
> --
>
> Key: PHOENIX-6447
> URL: https://issues.apache.org/jira/browse/PHOENIX-6447
> Project: Phoenix
>  Issue Type: Bug
>  Components: core
>Reporter: Sandeep Pal
>Assignee: Sandeep Pal
>Priority: Major
> Fix For: 4.16.0
>
>
> In order to replicate system tables, we have a special filter for system 
> catalog table to just replicate tenant owner data in order NOT to mess up the 
> system catalog at the sink cluster. In 4.16, there is a new table getting 
> added (SYSTEM.CHILD_LINK) which will not be replicated completely from our 
> existing filter. 



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


[jira] [Created] (PHOENIX-6447) Add support for SYSTEM.CHILD_LINK table in systemcatalogwalentryfilter

2021-04-19 Thread Sandeep Pal (Jira)
Sandeep Pal created PHOENIX-6447:


 Summary: Add support for SYSTEM.CHILD_LINK table in 
systemcatalogwalentryfilter
 Key: PHOENIX-6447
 URL: https://issues.apache.org/jira/browse/PHOENIX-6447
 Project: Phoenix
  Issue Type: Bug
  Components: core
Reporter: Sandeep Pal
Assignee: Sandeep Pal
 Fix For: 4.16.0






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


[jira] [Updated] (PHOENIX-6428) Phoenix select subquery doesn't work on VARCHAR and CHAR types

2021-03-26 Thread Sandeep Pal (Jira)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-6428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sandeep Pal updated PHOENIX-6428:
-
Description: 
Phoenix select subquery doesn't work on VARCHAR and CHAR types in two tables 
when column with type `CHAR(N)` as value lesser than N bytes. .

Steps to reproduce:

CREATE TABLE TEST.TABLE_WITH_VARCHAR (ID VARCHAR NOT NULL,CONSTRAINT PK PRIMARY 
KEY (ID));

CREATE TABLE TEST.TABLE_WITH_CHAR (ID CHAR(15) NOT NULL,CONSTRAINT PK PRIMARY 
KEY (ID));

 

UPSERT INTO TEST.TABLE_WITH_VARCHAR(ID) VALUES ('00');

UPSERT INTO TEST.TABLE_WITH_CHAR(ID) VALUES ('00');

 

select * from test.table_with_varchar where id not in (select id from 
test.table_with_char);

 
{code:java}
0: jdbc:phoenix:localhost:56632> CREATE TABLE TEST.TABLE_WITH_VARCHAR (ID 
VARCHAR NOT NULL,CONSTRAINT PK PRIMARY KEY (ID));
No rows affected (2.354 seconds)
0: jdbc:phoenix:localhost:56632> CREATE TABLE TEST.TABLE_WITH_CHAR (ID CHAR(15) 
NOT NULL,CONSTRAINT PK PRIMARY KEY (ID));
No rows affected (2.254 seconds)
0: jdbc:phoenix:localhost:52919> UPSERT INTO TEST.TABLE_WITH_VARCHAR(ID) VALUES 
('00');
1 row affected (0.041 seconds)
0: jdbc:phoenix:localhost:52919> UPSERT INTO TEST.TABLE_WITH_CHAR(ID) VALUES 
('00');
1 row affected (0.004 seconds)
0: jdbc:phoenix:localhost:52919> select * from test.table_with_varchar where id 
not in (select id from test.table_with_char);
++
|   ID   |
++
| 00 |
++
1 row selected (0.109 seconds)
0: jdbc:phoenix:localhost:52919> UPSERT INTO TEST.TABLE_WITH_CHAR(ID) VALUES 
('ABC');
1 row affected (0.005 seconds)
0: jdbc:phoenix:localhost:52919> UPSERT INTO TEST.TABLE_WITH_VARCHAR(ID) VALUES 
('ABC');
1 row affected (0.006 seconds)
0: jdbc:phoenix:localhost:52919> select * from test.table_with_varchar where id 
not in (select id from test.table_with_char);
++
|   ID   |
++
| 00 |
| ABC|
++
2 rows selected (0.026 seconds)
0: jdbc:phoenix:localhost:52919> select * from test.table_with_char;
++
|   ID   |
++
| 00 |
| ABC|
++
2 rows selected (0.013 seconds)
0: jdbc:phoenix:localhost:52919> select * from test.table_with_varchar;
++
|   ID   |
++
| 00 |
| ABC|
++
2 rows selected (0.011 seconds)
0: jdbc:phoenix:localhost:52919> select * from test.table_with_varchar where id 
in (select id from test.table_with_char);
++
| ID |
++
++{code}
This returns empty.  

 

  was:
Phoenix select subquery doesn't work on VARCHAR and CHAR types in two tables 
when column with type CHAR(n) as value lesser than n bytes. .

Steps to reproduce:

CREATE TABLE TEST.TABLE_WITH_VARCHAR (ID VARCHAR NOT NULL,CONSTRAINT PK PRIMARY 
KEY (ID));

CREATE TABLE TEST.TABLE_WITH_CHAR (ID CHAR(15) NOT NULL,CONSTRAINT PK PRIMARY 
KEY (ID));

 

UPSERT INTO TEST.TABLE_WITH_VARCHAR(ID) VALUES ('00');

UPSERT INTO TEST.TABLE_WITH_CHAR(ID) VALUES ('00');

 

select * from test.table_with_varchar where id not in (select id from 
test.table_with_char);

 
{code:java}
0: jdbc:phoenix:localhost:56632> CREATE TABLE TEST.TABLE_WITH_VARCHAR (ID 
VARCHAR NOT NULL,CONSTRAINT PK PRIMARY KEY (ID));
No rows affected (2.354 seconds)
0: jdbc:phoenix:localhost:56632> CREATE TABLE TEST.TABLE_WITH_CHAR (ID CHAR(15) 
NOT NULL,CONSTRAINT PK PRIMARY KEY (ID));
No rows affected (2.254 seconds)
0: jdbc:phoenix:localhost:52919> UPSERT INTO TEST.TABLE_WITH_VARCHAR(ID) VALUES 
('00');
1 row affected (0.041 seconds)
0: jdbc:phoenix:localhost:52919> UPSERT INTO TEST.TABLE_WITH_CHAR(ID) VALUES 
('00');
1 row affected (0.004 seconds)
0: jdbc:phoenix:localhost:52919> select * from test.table_with_varchar where id 
not in (select id from test.table_with_char);
++
|   ID   |
++
| 00 |
++
1 row selected (0.109 seconds)
0: jdbc:phoenix:localhost:52919> UPSERT INTO TEST.TABLE_WITH_CHAR(ID) VALUES 
('ABC');
1 row affected (0.005 seconds)
0: jdbc:phoenix:localhost:52919> UPSERT INTO TEST.TABLE_WITH_VARCHAR(ID) VALUES 
('ABC');
1 row affected (0.006 seconds)
0: jdbc:phoenix:localhost:52919> select * from test.table_with_varchar where id 
not in (select id from test.table_with_char);
++
|   ID   |
++
| 00 |
| ABC|
++
2 rows selected (0.026 seconds)
0: jdbc:phoenix:localhost:52919> select * from test.table_with_char;
++
|   ID   |
++
| 00 |
| ABC|
++
2 rows selected (0.013 seconds)
0: jdbc:phoenix:localhost:52919> select * from test.table_with_varchar;

[jira] [Updated] (PHOENIX-6428) Phoenix select subquery doesn't work on VARCHAR and CHAR types

2021-03-26 Thread Sandeep Pal (Jira)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-6428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sandeep Pal updated PHOENIX-6428:
-
Description: 
Phoenix select subquery doesn't work on VARCHAR and CHAR types in two tables 
when column with type CHAR(n) as value lesser than n bytes. .

Steps to reproduce:

CREATE TABLE TEST.TABLE_WITH_VARCHAR (ID VARCHAR NOT NULL,CONSTRAINT PK PRIMARY 
KEY (ID));

CREATE TABLE TEST.TABLE_WITH_CHAR (ID CHAR(15) NOT NULL,CONSTRAINT PK PRIMARY 
KEY (ID));

 

UPSERT INTO TEST.TABLE_WITH_VARCHAR(ID) VALUES ('00');

UPSERT INTO TEST.TABLE_WITH_CHAR(ID) VALUES ('00');

 

select * from test.table_with_varchar where id not in (select id from 
test.table_with_char);

 
{code:java}
0: jdbc:phoenix:localhost:56632> CREATE TABLE TEST.TABLE_WITH_VARCHAR (ID 
VARCHAR NOT NULL,CONSTRAINT PK PRIMARY KEY (ID));
No rows affected (2.354 seconds)
0: jdbc:phoenix:localhost:56632> CREATE TABLE TEST.TABLE_WITH_CHAR (ID CHAR(15) 
NOT NULL,CONSTRAINT PK PRIMARY KEY (ID));
No rows affected (2.254 seconds)
0: jdbc:phoenix:localhost:52919> UPSERT INTO TEST.TABLE_WITH_VARCHAR(ID) VALUES 
('00');
1 row affected (0.041 seconds)
0: jdbc:phoenix:localhost:52919> UPSERT INTO TEST.TABLE_WITH_CHAR(ID) VALUES 
('00');
1 row affected (0.004 seconds)
0: jdbc:phoenix:localhost:52919> select * from test.table_with_varchar where id 
not in (select id from test.table_with_char);
++
|   ID   |
++
| 00 |
++
1 row selected (0.109 seconds)
0: jdbc:phoenix:localhost:52919> UPSERT INTO TEST.TABLE_WITH_CHAR(ID) VALUES 
('ABC');
1 row affected (0.005 seconds)
0: jdbc:phoenix:localhost:52919> UPSERT INTO TEST.TABLE_WITH_VARCHAR(ID) VALUES 
('ABC');
1 row affected (0.006 seconds)
0: jdbc:phoenix:localhost:52919> select * from test.table_with_varchar where id 
not in (select id from test.table_with_char);
++
|   ID   |
++
| 00 |
| ABC|
++
2 rows selected (0.026 seconds)
0: jdbc:phoenix:localhost:52919> select * from test.table_with_char;
++
|   ID   |
++
| 00 |
| ABC|
++
2 rows selected (0.013 seconds)
0: jdbc:phoenix:localhost:52919> select * from test.table_with_varchar;
++
|   ID   |
++
| 00 |
| ABC|
++
2 rows selected (0.011 seconds)
0: jdbc:phoenix:localhost:52919> select * from test.table_with_varchar where id 
in (select id from test.table_with_char);
++
| ID |
++
++{code}
This returns empty.  

 

  was:
Phoenix select subquery doesn't work on VARCHAR and CHAR types in two tables.

Steps to reproduce:

CREATE TABLE TEST.TABLE_WITH_VARCHAR (ID VARCHAR NOT NULL,CONSTRAINT PK PRIMARY 
KEY (ID));

CREATE TABLE TEST.TABLE_WITH_CHAR (ID CHAR(15) NOT NULL,CONSTRAINT PK PRIMARY 
KEY (ID));

 

UPSERT INTO TEST.TABLE_WITH_VARCHAR(ID) VALUES ('000');

UPSERT INTO TEST.TABLE_WITH_CHAR(ID) VALUES ('000');

 

select * from test.table_with_varchar where id not in (select id from 
test.table_with_char);

 
{code:java}
0: jdbc:phoenix:localhost:56632> CREATE TABLE TEST.TABLE_WITH_VARCHAR (ID 
VARCHAR NOT NULL,CONSTRAINT PK PRIMARY KEY (ID));
No rows affected (2.354 seconds)
0: jdbc:phoenix:localhost:56632> CREATE TABLE TEST.TABLE_WITH_CHAR (ID CHAR(15) 
NOT NULL,CONSTRAINT PK PRIMARY KEY (ID));
No rows affected (2.254 seconds)
0: jdbc:phoenix:localhost:56632> UPSERT INTO TEST.TABLE_WITH_VARCHAR(ID) VALUES 
('000');
1 row affected (0.04 seconds)
0: jdbc:phoenix:localhost:56632> UPSERT INTO TEST.TABLE_WITH_CHAR(ID) VALUES 
('000');
1 row affected (0.005 seconds)
0: jdbc:phoenix:localhost:56632> select * from test.table_with_varchar;
+-+
|   ID|
+-+
| 000 |
+-+
1 row selected (0.032 seconds)
0: jdbc:phoenix:localhost:56632> select * from test.table_with_char;
+-+
|   ID|
+-+
| 000 |
+-+
1 row selected (0.015 seconds)
0: jdbc:phoenix:localhost:56632> select * from test.table_with_varchar where id 
not in (select id from test.table_with_char);
++
| ID |
++
++{code}
This returns empty.  

 


> Phoenix select subquery doesn't work on VARCHAR and CHAR types
> --
>
> Key: PHOENIX-6428
> URL: https://issues.apache.org/jira/browse/PHOENIX-6428
> Project: Phoenix
>  Issue Type: Improvement
>Affects Versions: 4.14.3, 4.16.0, 4.17.0
>Reporter: Sandeep Pal
>Priority: Major
>
> Phoenix select subquery doesn't work on VARCHAR and CHAR types in two tables 
> when column with type 

[jira] [Updated] (PHOENIX-6428) Phoenix select subquery doesn't work on VARCHAR and CHAR types

2021-03-25 Thread Sandeep Pal (Jira)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-6428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sandeep Pal updated PHOENIX-6428:
-
Description: 
Phoenix select subquery doesn't work on VARCHAR and CHAR types in two tables.

Steps to reproduce:

CREATE TABLE TEST.TABLE_WITH_VARCHAR (ID VARCHAR NOT NULL,CONSTRAINT PK PRIMARY 
KEY (ID));

CREATE TABLE TEST.TABLE_WITH_CHAR (ID CHAR(15) NOT NULL,CONSTRAINT PK PRIMARY 
KEY (ID));

 

UPSERT INTO TEST.TABLE_WITH_VARCHAR(ID) VALUES ('000');

UPSERT INTO TEST.TABLE_WITH_CHAR(ID) VALUES ('000');

 

select * from test.table_with_varchar where id not in (select id from 
test.table_with_char);

 
{code:java}
0: jdbc:phoenix:localhost:56632> CREATE TABLE TEST.TABLE_WITH_VARCHAR (ID 
VARCHAR NOT NULL,CONSTRAINT PK PRIMARY KEY (ID));
No rows affected (2.354 seconds)
0: jdbc:phoenix:localhost:56632> CREATE TABLE TEST.TABLE_WITH_CHAR (ID CHAR(15) 
NOT NULL,CONSTRAINT PK PRIMARY KEY (ID));
No rows affected (2.254 seconds)
0: jdbc:phoenix:localhost:56632> UPSERT INTO TEST.TABLE_WITH_VARCHAR(ID) VALUES 
('000');
1 row affected (0.04 seconds)
0: jdbc:phoenix:localhost:56632> UPSERT INTO TEST.TABLE_WITH_CHAR(ID) VALUES 
('000');
1 row affected (0.005 seconds)
0: jdbc:phoenix:localhost:56632> select * from test.table_with_varchar;
+-+
|   ID|
+-+
| 000 |
+-+
1 row selected (0.032 seconds)
0: jdbc:phoenix:localhost:56632> select * from test.table_with_char;
+-+
|   ID|
+-+
| 000 |
+-+
1 row selected (0.015 seconds)
0: jdbc:phoenix:localhost:56632> select * from test.table_with_varchar where id 
not in (select id from test.table_with_char);
++
| ID |
++
++{code}
This returns empty.  

 

  was:
Phoenix select subquery doesn't work on VARCHAR and CHAR types in two tables.

Steps to reproduce:

CREATE TABLE TEST.TABLE_WITH_VARCHAR (ID VARCHAR NOT NULL,CONSTRAINT PK PRIMARY 
KEY (ID));

CREATE TABLE TEST.TABLE_WITH_CHAR (ID CHAR(15) NOT NULL,CONSTRAINT PK PRIMARY 
KEY (ID));

 

UPSERT INTO TEST.TABLE_WITH_VARCHAR(ID) VALUES ('000');

UPSERT INTO TEST.TABLE_WITH_CHAR(ID) VALUES ('000');

 

select * from test.table_varchar as T join test.table_with_char as S on 
S.ID=T.ID;

 
{code:java}
0: jdbc:phoenix:localhost:56632> CREATE TABLE TEST.TABLE_WITH_VARCHAR (ID 
VARCHAR NOT NULL,CONSTRAINT PK PRIMARY KEY (ID));
No rows affected (2.354 seconds)
0: jdbc:phoenix:localhost:56632> CREATE TABLE TEST.TABLE_WITH_CHAR (ID CHAR(15) 
NOT NULL,CONSTRAINT PK PRIMARY KEY (ID));
No rows affected (2.254 seconds)
0: jdbc:phoenix:localhost:56632> UPSERT INTO TEST.TABLE_WITH_VARCHAR(ID) VALUES 
('000');
1 row affected (0.04 seconds)
0: jdbc:phoenix:localhost:56632> UPSERT INTO TEST.TABLE_WITH_CHAR(ID) VALUES 
('000');
1 row affected (0.005 seconds)
0: jdbc:phoenix:localhost:56632> select * from test.table_with_varchar;
+-+
|   ID|
+-+
| 000 |
+-+
1 row selected (0.032 seconds)
0: jdbc:phoenix:localhost:56632> select * from test.table_with_char;
+-+
|   ID|
+-+
| 000 |
+-+
1 row selected (0.015 seconds)
0: jdbc:phoenix:localhost:56632> select * from test.table_with_varchar where id 
not in (select id from test.table_with_char);
++
| ID |
++
++{code}
This returns empty.  

 


> Phoenix select subquery doesn't work on VARCHAR and CHAR types
> --
>
> Key: PHOENIX-6428
> URL: https://issues.apache.org/jira/browse/PHOENIX-6428
> Project: Phoenix
>  Issue Type: Improvement
>Affects Versions: 4.14.3, 4.16.0, 4.17.0
>Reporter: Sandeep Pal
>Priority: Major
>
> Phoenix select subquery doesn't work on VARCHAR and CHAR types in two tables.
> Steps to reproduce:
> CREATE TABLE TEST.TABLE_WITH_VARCHAR (ID VARCHAR NOT NULL,CONSTRAINT PK 
> PRIMARY KEY (ID));
> CREATE TABLE TEST.TABLE_WITH_CHAR (ID CHAR(15) NOT NULL,CONSTRAINT PK PRIMARY 
> KEY (ID));
>  
> UPSERT INTO TEST.TABLE_WITH_VARCHAR(ID) VALUES ('000');
> UPSERT INTO TEST.TABLE_WITH_CHAR(ID) VALUES ('000');
>  
> select * from test.table_with_varchar where id not in (select id from 
> test.table_with_char);
>  
> {code:java}
> 0: jdbc:phoenix:localhost:56632> CREATE TABLE TEST.TABLE_WITH_VARCHAR (ID 
> VARCHAR NOT NULL,CONSTRAINT PK PRIMARY KEY (ID));
> No rows affected (2.354 seconds)
> 0: jdbc:phoenix:localhost:56632> CREATE TABLE TEST.TABLE_WITH_CHAR (ID 
> CHAR(15) NOT NULL,CONSTRAINT PK PRIMARY KEY (ID));
> No rows affected (2.254 seconds)
> 0: jdbc:phoenix:localhost:56632> UPSERT INTO TEST.TABLE_WITH_VARCHAR(ID) 
> VALUES 

[jira] [Updated] (PHOENIX-6428) Phoenix select subquery doesn't work on VARCHAR and CHAR types

2021-03-25 Thread Sandeep Pal (Jira)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-6428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sandeep Pal updated PHOENIX-6428:
-
Description: 
Phoenix select subquery doesn't work on VARCHAR and CHAR types in two tables.

Steps to reproduce:

CREATE TABLE TEST.TABLE_WITH_VARCHAR (ID VARCHAR NOT NULL,CONSTRAINT PK PRIMARY 
KEY (ID));

CREATE TABLE TEST.TABLE_WITH_CHAR (ID CHAR(15) NOT NULL,CONSTRAINT PK PRIMARY 
KEY (ID));

 

UPSERT INTO TEST.TABLE_WITH_VARCHAR(ID) VALUES ('000');

UPSERT INTO TEST.TABLE_WITH_CHAR(ID) VALUES ('000');

 

select * from test.table_varchar as T join test.table_with_char as S on 
S.ID=T.ID;

 
{code:java}
0: jdbc:phoenix:localhost:56632> CREATE TABLE TEST.TABLE_WITH_VARCHAR (ID 
VARCHAR NOT NULL,CONSTRAINT PK PRIMARY KEY (ID));
No rows affected (2.354 seconds)
0: jdbc:phoenix:localhost:56632> CREATE TABLE TEST.TABLE_WITH_CHAR (ID CHAR(15) 
NOT NULL,CONSTRAINT PK PRIMARY KEY (ID));
No rows affected (2.254 seconds)
0: jdbc:phoenix:localhost:56632> UPSERT INTO TEST.TABLE_WITH_VARCHAR(ID) VALUES 
('000');
1 row affected (0.04 seconds)
0: jdbc:phoenix:localhost:56632> UPSERT INTO TEST.TABLE_WITH_CHAR(ID) VALUES 
('000');
1 row affected (0.005 seconds)
0: jdbc:phoenix:localhost:56632> select * from test.table_with_varchar;
+-+
|   ID|
+-+
| 000 |
+-+
1 row selected (0.032 seconds)
0: jdbc:phoenix:localhost:56632> select * from test.table_with_char;
+-+
|   ID|
+-+
| 000 |
+-+
1 row selected (0.015 seconds)
0: jdbc:phoenix:localhost:56632> select * from test.table_with_varchar where id 
not in (select id from test.table_with_char);
++
| ID |
++
++{code}
This returns empty.  

 

  was:
When doing the join on two tables on columns with VARCHAR and CHAR, the join 
condition doesn't work. 

Steps to reproduce:

CREATE TABLE TEST.TABLE_WITH_VARCHAR (ID VARCHAR NOT NULL,CONSTRAINT PK PRIMARY 
KEY (ID,));

CREATE TABLE TEST.TABLE_WITH_CHAR (ID CHAR(15) NOT NULL,CONSTRAINT PK PRIMARY 
KEY (ID));

 

UPSERT INTO TEST.TABLE_WITH_VARCHAR(ID) VALUES ('000');

UPSERT INTO TEST.TABLE_WITH_CHAR(ID) VALUES ('000');

 

select * from test.table_varchar as T join test.table_with_char as S on 
S.ID=T.ID;

 

This returns empty.  

 


> Phoenix select subquery doesn't work on VARCHAR and CHAR types
> --
>
> Key: PHOENIX-6428
> URL: https://issues.apache.org/jira/browse/PHOENIX-6428
> Project: Phoenix
>  Issue Type: Improvement
>Affects Versions: 4.14.3, 4.16.0, 4.17.0
>Reporter: Sandeep Pal
>Priority: Major
>
> Phoenix select subquery doesn't work on VARCHAR and CHAR types in two tables.
> Steps to reproduce:
> CREATE TABLE TEST.TABLE_WITH_VARCHAR (ID VARCHAR NOT NULL,CONSTRAINT PK 
> PRIMARY KEY (ID));
> CREATE TABLE TEST.TABLE_WITH_CHAR (ID CHAR(15) NOT NULL,CONSTRAINT PK PRIMARY 
> KEY (ID));
>  
> UPSERT INTO TEST.TABLE_WITH_VARCHAR(ID) VALUES ('000');
> UPSERT INTO TEST.TABLE_WITH_CHAR(ID) VALUES ('000');
>  
> select * from test.table_varchar as T join test.table_with_char as S on 
> S.ID=T.ID;
>  
> {code:java}
> 0: jdbc:phoenix:localhost:56632> CREATE TABLE TEST.TABLE_WITH_VARCHAR (ID 
> VARCHAR NOT NULL,CONSTRAINT PK PRIMARY KEY (ID));
> No rows affected (2.354 seconds)
> 0: jdbc:phoenix:localhost:56632> CREATE TABLE TEST.TABLE_WITH_CHAR (ID 
> CHAR(15) NOT NULL,CONSTRAINT PK PRIMARY KEY (ID));
> No rows affected (2.254 seconds)
> 0: jdbc:phoenix:localhost:56632> UPSERT INTO TEST.TABLE_WITH_VARCHAR(ID) 
> VALUES ('000');
> 1 row affected (0.04 seconds)
> 0: jdbc:phoenix:localhost:56632> UPSERT INTO TEST.TABLE_WITH_CHAR(ID) VALUES 
> ('000');
> 1 row affected (0.005 seconds)
> 0: jdbc:phoenix:localhost:56632> select * from test.table_with_varchar;
> +-+
> |   ID|
> +-+
> | 000 |
> +-+
> 1 row selected (0.032 seconds)
> 0: jdbc:phoenix:localhost:56632> select * from test.table_with_char;
> +-+
> |   ID|
> +-+
> | 000 |
> +-+
> 1 row selected (0.015 seconds)
> 0: jdbc:phoenix:localhost:56632> select * from test.table_with_varchar where 
> id not in (select id from test.table_with_char);
> ++
> | ID |
> ++
> ++{code}
> This returns empty.  
>  



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


[jira] [Updated] (PHOENIX-6428) Phoenix select subquery doesn't work on VARCHAR and CHAR types

2021-03-25 Thread Sandeep Pal (Jira)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-6428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sandeep Pal updated PHOENIX-6428:
-
Summary: Phoenix select subquery doesn't work on VARCHAR and CHAR types  
(was: Join on columns with VARCHAR and CHAR types doesn't work)

> Phoenix select subquery doesn't work on VARCHAR and CHAR types
> --
>
> Key: PHOENIX-6428
> URL: https://issues.apache.org/jira/browse/PHOENIX-6428
> Project: Phoenix
>  Issue Type: Improvement
>Affects Versions: 4.14.3, 4.16.0, 4.17.0
>Reporter: Sandeep Pal
>Priority: Major
>
> When doing the join on two tables on columns with VARCHAR and CHAR, the join 
> condition doesn't work. 
> Steps to reproduce:
> CREATE TABLE TEST.TABLE_WITH_VARCHAR (ID VARCHAR NOT NULL,CONSTRAINT PK 
> PRIMARY KEY (ID,));
> CREATE TABLE TEST.TABLE_WITH_CHAR (ID CHAR(15) NOT NULL,CONSTRAINT PK PRIMARY 
> KEY (ID));
>  
> UPSERT INTO TEST.TABLE_WITH_VARCHAR(ID) VALUES ('000');
> UPSERT INTO TEST.TABLE_WITH_CHAR(ID) VALUES ('000');
>  
> select * from test.table_varchar as T join test.table_with_char as S on 
> S.ID=T.ID;
>  
> This returns empty.  
>  



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


[jira] [Updated] (PHOENIX-6428) Join on columns with VARCHAR and CHAR types doesn't work

2021-03-25 Thread Sandeep Pal (Jira)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-6428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sandeep Pal updated PHOENIX-6428:
-
Description: 
When doing the join on two tables on columns with VARCHAR and CHAR, the join 
condition doesn't work. 

Steps to reproduce:

CREATE TABLE TEST.TABLE_WITH_VARCHAR (ID VARCHAR NOT NULL,CONSTRAINT PK PRIMARY 
KEY (ID,));

CREATE TABLE TEST.TABLE_WITH_CHAR (ID CHAR(15) NOT NULL,CONSTRAINT PK PRIMARY 
KEY (ID));

 

UPSERT INTO TEST.TABLE_WITH_VARCHAR(ID) VALUES ('000');

UPSERT INTO TEST.TABLE_WITH_CHAR(ID) VALUES ('000');

 

select * from test.table_varchar as T join test.table_with_char as S on 
S.ID=T.ID;

 

This returns empty.  

 

  was:
When doing the join on two tables on columns with VARCHAR and CHAR, the join 
condition doesn't work. 

Steps to reproduce:

CREATE TABLE TEST.TABLE_WITH_VARCHAR (ID VARCHAR NOT NULL,CONSTRAINT PK PRIMARY 
KEY (ID,));

CREATE TABLE TEST.TABLE_WITH_CHAR (ID CHAR(15) NOT NULL,CONSTRAINT PK PRIMARY 
KEY (ID));

 

UPSERT INTO TEST.TABLE_WITH_VARCHAR(ID) VALUES ('ABC');

UPSERT INTO TEST.TABLE_WITH_CHAR(ID) VALUES ('ABC');

 

select * from test.table_varchar as T join test.table_with_char as S on 
S.ID=T.ID;

 

This returns empty.  

 


> Join on columns with VARCHAR and CHAR types doesn't work
> 
>
> Key: PHOENIX-6428
> URL: https://issues.apache.org/jira/browse/PHOENIX-6428
> Project: Phoenix
>  Issue Type: Improvement
>Affects Versions: 4.14.3, 4.16.0, 4.17.0
>Reporter: Sandeep Pal
>Priority: Major
>
> When doing the join on two tables on columns with VARCHAR and CHAR, the join 
> condition doesn't work. 
> Steps to reproduce:
> CREATE TABLE TEST.TABLE_WITH_VARCHAR (ID VARCHAR NOT NULL,CONSTRAINT PK 
> PRIMARY KEY (ID,));
> CREATE TABLE TEST.TABLE_WITH_CHAR (ID CHAR(15) NOT NULL,CONSTRAINT PK PRIMARY 
> KEY (ID));
>  
> UPSERT INTO TEST.TABLE_WITH_VARCHAR(ID) VALUES ('000');
> UPSERT INTO TEST.TABLE_WITH_CHAR(ID) VALUES ('000');
>  
> select * from test.table_varchar as T join test.table_with_char as S on 
> S.ID=T.ID;
>  
> This returns empty.  
>  



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


[jira] [Created] (PHOENIX-6428) Join on columns with VARCHAR and CHAR types doesn't work

2021-03-25 Thread Sandeep Pal (Jira)
Sandeep Pal created PHOENIX-6428:


 Summary: Join on columns with VARCHAR and CHAR types doesn't work
 Key: PHOENIX-6428
 URL: https://issues.apache.org/jira/browse/PHOENIX-6428
 Project: Phoenix
  Issue Type: Improvement
Affects Versions: 4.16.0, 4.14.3, 4.17.0
Reporter: Sandeep Pal


When doing the join on two tables on columns with VARCHAR and CHAR, the join 
condition doesn't work. 

Steps to reproduce:

CREATE TABLE TEST.TABLE_WITH_VARCHAR (ID VARCHAR NOT NULL,CONSTRAINT PK PRIMARY 
KEY (ID,));

CREATE TABLE TEST.TABLE_WITH_CHAR (ID CHAR(15) NOT NULL,CONSTRAINT PK PRIMARY 
KEY (ID));

 

UPSERT INTO TEST.TABLE_WITH_VARCHAR(ID) VALUES ('ABC');

UPSERT INTO TEST.TABLE_WITH_CHAR(ID) VALUES ('ABC');

 

select * from test.table_varchar as T join test.table_with_char as S on 
S.ID=T.ID;

 

This returns empty.  

 



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


[jira] [Created] (PHOENIX-6276) Log when hconnection is getting closed in ConnectionQueryServicesImpl

2020-12-22 Thread Sandeep Pal (Jira)
Sandeep Pal created PHOENIX-6276:


 Summary: Log when hconnection is getting closed in 
ConnectionQueryServicesImpl
 Key: PHOENIX-6276
 URL: https://issues.apache.org/jira/browse/PHOENIX-6276
 Project: Phoenix
  Issue Type: Improvement
  Components: core
Reporter: Sandeep Pal
Assignee: Sandeep Pal


It has been observed that for an active phoenix connection, the hconnection 
gets closed due to unknown reason. We should log every hconnection closure so 
we can track how this gets closed. 



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


[jira] [Updated] (PHOENIX-5895) Leverage WALCellFilter in the SystemCatalogWALEntryFilter to replicate system catalog table

2020-11-23 Thread Sandeep Pal (Jira)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-5895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sandeep Pal updated PHOENIX-5895:
-
Fix Version/s: 4.16.1
   5.1.1

> Leverage WALCellFilter in the SystemCatalogWALEntryFilter to replicate system 
> catalog table
> ---
>
> Key: PHOENIX-5895
> URL: https://issues.apache.org/jira/browse/PHOENIX-5895
> Project: Phoenix
>  Issue Type: Improvement
>  Components: core
>Affects Versions: 5.0.0-alpha, 4.x
>Reporter: Sandeep Pal
>Assignee: Sandeep Pal
>Priority: Minor
> Fix For: 5.0.0-alpha, 5.1.0, 5.1.1, 4.16.0, 4.x, 4.16.1
>
>




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


[jira] [Updated] (PHOENIX-5895) Leverage WALCellFilter in the SystemCatalogWALEntryFilter to replicate system catalog table

2020-11-23 Thread Sandeep Pal (Jira)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-5895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sandeep Pal updated PHOENIX-5895:
-
Fix Version/s: 4.16.0
   5.1.0

> Leverage WALCellFilter in the SystemCatalogWALEntryFilter to replicate system 
> catalog table
> ---
>
> Key: PHOENIX-5895
> URL: https://issues.apache.org/jira/browse/PHOENIX-5895
> Project: Phoenix
>  Issue Type: Improvement
>  Components: core
>Affects Versions: 5.0.0-alpha, 4.x
>Reporter: Sandeep Pal
>Assignee: Sandeep Pal
>Priority: Minor
> Fix For: 5.0.0-alpha, 5.1.0, 4.16.0, 4.x
>
>




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


[jira] [Resolved] (PHOENIX-5895) Leverage WALCellFilter in the SystemCatalogWALEntryFilter to replicate system catalog table

2020-11-23 Thread Sandeep Pal (Jira)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-5895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sandeep Pal resolved PHOENIX-5895.
--
Resolution: Fixed

> Leverage WALCellFilter in the SystemCatalogWALEntryFilter to replicate system 
> catalog table
> ---
>
> Key: PHOENIX-5895
> URL: https://issues.apache.org/jira/browse/PHOENIX-5895
> Project: Phoenix
>  Issue Type: Improvement
>  Components: core
>Affects Versions: 5.0.0-alpha, 4.x
>Reporter: Sandeep Pal
>Assignee: Sandeep Pal
>Priority: Minor
> Fix For: 4.x, 5.0.0-alpha
>
>




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


[jira] [Updated] (PHOENIX-5895) Leverage WALCellFilter in the SystemCatalogWALEntryFilter to replicate system catalog table

2020-11-23 Thread Sandeep Pal (Jira)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-5895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sandeep Pal updated PHOENIX-5895:
-
Affects Version/s: 4.x
   5.0.0-alpha

> Leverage WALCellFilter in the SystemCatalogWALEntryFilter to replicate system 
> catalog table
> ---
>
> Key: PHOENIX-5895
> URL: https://issues.apache.org/jira/browse/PHOENIX-5895
> Project: Phoenix
>  Issue Type: Improvement
>  Components: core
>Affects Versions: 5.0.0-alpha, 4.x
>Reporter: Sandeep Pal
>Assignee: Sandeep Pal
>Priority: Minor
>




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


[jira] [Updated] (PHOENIX-5895) Leverage WALCellFilter in the SystemCatalogWALEntryFilter to replicate system catalog table

2020-11-23 Thread Sandeep Pal (Jira)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-5895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sandeep Pal updated PHOENIX-5895:
-
Fix Version/s: 5.0.0-alpha
   4.x

> Leverage WALCellFilter in the SystemCatalogWALEntryFilter to replicate system 
> catalog table
> ---
>
> Key: PHOENIX-5895
> URL: https://issues.apache.org/jira/browse/PHOENIX-5895
> Project: Phoenix
>  Issue Type: Improvement
>  Components: core
>Affects Versions: 5.0.0-alpha, 4.x
>Reporter: Sandeep Pal
>Assignee: Sandeep Pal
>Priority: Minor
> Fix For: 5.0.0-alpha, 4.x
>
>




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


[jira] [Created] (PHOENIX-5895) Leverage WALCellFilter in the SystemCatalogWALEntryFilter to replicate system catalog table

2020-05-13 Thread Sandeep Pal (Jira)
Sandeep Pal created PHOENIX-5895:


 Summary: Leverage WALCellFilter in the SystemCatalogWALEntryFilter 
to replicate system catalog table
 Key: PHOENIX-5895
 URL: https://issues.apache.org/jira/browse/PHOENIX-5895
 Project: Phoenix
  Issue Type: Improvement
  Components: core
Reporter: Sandeep Pal
Assignee: Sandeep Pal






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


[jira] [Updated] (PHOENIX-5542) UPSERT in VIEW fails using global connection if we have a view index on it and a global index on base table

2019-10-22 Thread Sandeep Pal (Jira)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-5542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sandeep Pal updated PHOENIX-5542:
-
Description: 
Stacktrace:

 

 
{code:java}
0: jdbc:phoenix:stg2hdaas-mnds1-1-prd.eng.sfd> UPSERT INTO 
TEST.VIEW_ON_BASE(ORGANIZATION_ID,CREATED_DATE,CREATED_BY,ONE,TWO,THREE) VALUES 
('00D000SANP1',TO_DATE('1975-1-2 12:00:00'),'004','15','24', 
'34');
[main] INFO org.apache.phoenix.execute.MutationState - Abort successful
java.lang.ArrayIndexOutOfBoundsException: 127
at 
org.apache.phoenix.index.IndexMaintainer.initCachedState(IndexMaintainer.java:1614)
at org.apache.phoenix.index.IndexMaintainer.(IndexMaintainer.java:569)
at org.apache.phoenix.index.IndexMaintainer.create(IndexMaintainer.java:143)
at org.apache.phoenix.schema.PTableImpl.getIndexMaintainer(PTableImpl.java:1165)
at org.apache.phoenix.util.IndexUtil.generateIndexData(IndexUtil.java:325)
at org.apache.phoenix.execute.MutationState$1.next(MutationState.java:563)
at org.apache.phoenix.execute.MutationState$1.next(MutationState.java:521)
at org.apache.phoenix.execute.MutationState.send(MutationState.java:928)
at org.apache.phoenix.execute.MutationState.send(MutationState.java:1539)
at org.apache.phoenix.execute.MutationState.commit(MutationState.java:1362)
at org.apache.phoenix.jdbc.PhoenixConnection$3.call(PhoenixConnection.java:675)
at org.apache.phoenix.jdbc.PhoenixConnection$3.call(PhoenixConnection.java:671)
at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
at org.apache.phoenix.jdbc.PhoenixConnection.commit(PhoenixConnection.java:671)
at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:413)
at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:393)
at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
at 
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:392)
at 
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:380)
at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1829)
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)
{code}
 

Steps to reproduce:

 
{code:java}
CREATE TABLE IF NOT EXISTS TEST.BASE_TABLE (
 ORGANIZATION_ID CHAR(15) NOT NULL,
 KEY_PREFIX CHAR(3) NOT NULL, 
 CREATED_DATE DATE,
 CREATED_BY CHAR(15),
 CONSTRAINT PK PRIMARY KEY (
 ORGANIZATION_ID,
 KEY_PREFIX
 )
 ) VERSIONS=1, MULTI_TENANT=true, IMMUTABLE_ROWS=true, REPLICATION_SCOPE=1;
CREATE VIEW IF NOT EXISTS TEST.VIEW_ON_BASE (
 ONE VARCHAR, 
 TWO VARCHAR, 
 THREE VARCHAR
 CONSTRAINT PKVIEW PRIMARY KEY
 (
 ONE, TWO
 )
 )
 AS SELECT * FROM TEST.BASE_TABLE WHERE KEY_PREFIX = '0CY';
CREATE INDEX IF NOT EXISTS VIEW_INDEX_ON_VIEW
 ON TEST.VIEW_ON_BASE (THREE)
 INCLUDE (ONE, TWO);
CREATE INDEX IF NOT EXISTS INDEX_ON_BASE_TABLE
 ON TEST.BASE_TABLE (CREATED_DATE)
 INCLUDE (CREATED_BY) ASYNC REPLICATION_SCOPE=1;
###UPSERT
 UPSERT INTO 
TEST.VIEW_ON_BASE(ORGANIZATION_ID,CREATED_DATE,CREATED_BY,ONE,TWO,THREE) VALUES 
('00D000SANP1',TO_DATE('1975-1-2 12:00:00'),'004','15','24', 
'34');
 
{code}
 

 

  was:
Stacktrace:

 

 
{code:java}
0: jdbc:phoenix:stg2hdaas-mnds1-1-prd.eng.sfd> UPSERT INTO 
TEST.ODR_MUTABLE_MT_10_22_2_VIEW(ORGANIZATION_ID,CREATED_DATE,CREATED_BY,ONE,TWO,THREE)
 VALUES ('00D000SANP1',TO_DATE('1975-1-2 
12:00:00'),'004','15','24', '34');
[main] INFO org.apache.phoenix.execute.MutationState - Abort successful
java.lang.ArrayIndexOutOfBoundsException: 127
at 
org.apache.phoenix.index.IndexMaintainer.initCachedState(IndexMaintainer.java:1614)
at org.apache.phoenix.index.IndexMaintainer.(IndexMaintainer.java:569)
at org.apache.phoenix.index.IndexMaintainer.create(IndexMaintainer.java:143)
at org.apache.phoenix.schema.PTableImpl.getIndexMaintainer(PTableImpl.java:1165)
at org.apache.phoenix.util.IndexUtil.generateIndexData(IndexUtil.java:325)
at org.apache.phoenix.execute.MutationState$1.next(MutationState.java:563)
at org.apache.phoenix.execute.MutationState$1.next(MutationState.java:521)
at org.apache.phoenix.execute.MutationState.send(MutationState.java:928)
at org.apache.phoenix.execute.MutationState.send(MutationState.java:1539)
at org.apache.phoenix.execute.MutationState.commit(MutationState.java:1362)
at org.apache.phoenix.jdbc.PhoenixConnection$3.call(PhoenixConnection.java:675)
at org.apache.phoenix.jdbc.PhoenixConnection$3.call(PhoenixConnection.java:671)
at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
at org.apache.phoenix.jdbc.PhoenixConnection.commit(PhoenixConnection.java:671)
at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:413)
at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:393)
at 

[jira] [Updated] (PHOENIX-5542) UPSERT in VIEW fails using global connection if we have a view index on it and a global index on base table

2019-10-22 Thread Sandeep Pal (Jira)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-5542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sandeep Pal updated PHOENIX-5542:
-
Description: 
Stacktrace:

 

 
{code:java}
0: jdbc:phoenix:stg2hdaas-mnds1-1-prd.eng.sfd> UPSERT INTO 
TEST.ODR_MUTABLE_MT_10_22_2_VIEW(ORGANIZATION_ID,CREATED_DATE,CREATED_BY,ONE,TWO,THREE)
 VALUES ('00D000SANP1',TO_DATE('1975-1-2 
12:00:00'),'004','15','24', '34');
[main] INFO org.apache.phoenix.execute.MutationState - Abort successful
java.lang.ArrayIndexOutOfBoundsException: 127
at 
org.apache.phoenix.index.IndexMaintainer.initCachedState(IndexMaintainer.java:1614)
at org.apache.phoenix.index.IndexMaintainer.(IndexMaintainer.java:569)
at org.apache.phoenix.index.IndexMaintainer.create(IndexMaintainer.java:143)
at org.apache.phoenix.schema.PTableImpl.getIndexMaintainer(PTableImpl.java:1165)
at org.apache.phoenix.util.IndexUtil.generateIndexData(IndexUtil.java:325)
at org.apache.phoenix.execute.MutationState$1.next(MutationState.java:563)
at org.apache.phoenix.execute.MutationState$1.next(MutationState.java:521)
at org.apache.phoenix.execute.MutationState.send(MutationState.java:928)
at org.apache.phoenix.execute.MutationState.send(MutationState.java:1539)
at org.apache.phoenix.execute.MutationState.commit(MutationState.java:1362)
at org.apache.phoenix.jdbc.PhoenixConnection$3.call(PhoenixConnection.java:675)
at org.apache.phoenix.jdbc.PhoenixConnection$3.call(PhoenixConnection.java:671)
at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
at org.apache.phoenix.jdbc.PhoenixConnection.commit(PhoenixConnection.java:671)
at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:413)
at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:393)
at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
at 
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:392)
at 
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:380)
at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1829)
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)
{code}
 

Steps to reproduce:

 
{code:java}
CREATE TABLE IF NOT EXISTS TEST.BASE_TABLE (
 ORGANIZATION_ID CHAR(15) NOT NULL,
 KEY_PREFIX CHAR(3) NOT NULL, 
 CREATED_DATE DATE,
 CREATED_BY CHAR(15),
 CONSTRAINT PK PRIMARY KEY (
 ORGANIZATION_ID,
 KEY_PREFIX
 )
 ) VERSIONS=1, MULTI_TENANT=true, IMMUTABLE_ROWS=true, REPLICATION_SCOPE=1;
CREATE VIEW IF NOT EXISTS TEST.VIEW_ON_BASE (
 ONE VARCHAR, 
 TWO VARCHAR, 
 THREE VARCHAR
 CONSTRAINT PKVIEW PRIMARY KEY
 (
 ONE, TWO
 )
 )
 AS SELECT * FROM TEST.BASE_TABLE WHERE KEY_PREFIX = '0CY';
CREATE INDEX IF NOT EXISTS VIEW_INDEX_ON_VIEW
 ON TEST.VIEW_ON_BASE (THREE)
 INCLUDE (ONE, TWO);
CREATE INDEX IF NOT EXISTS INDEX_ON_BASE_TABLE
 ON TEST.BASE_TABLE (CREATED_DATE)
 INCLUDE (CREATED_BY) ASYNC REPLICATION_SCOPE=1;
###UPSERT
 UPSERT INTO 
TEST.VIEW_ON_BASE(ORGANIZATION_ID,CREATED_DATE,CREATED_BY,ONE,TWO,THREE) VALUES 
('00D000SANP1',TO_DATE('1975-1-2 12:00:00'),'004','15','24', 
'34');
 
{code}
 

 

  was:
Stacktrace:

 

 
{code:java}
0: jdbc:phoenix:stg2hdaas-mnds1-1-prd.eng.sfd> UPSERT INTO 
TEST.ODR_MUTABLE_MT_10_22_2_VIEW(ORGANIZATION_ID,CREATED_DATE,CREATED_BY,ONE,TWO,THREE)
 VALUES ('00D000SANP1',TO_DATE('1975-1-2 
12:00:00'),'004','15','24', '34');
[main] INFO org.apache.phoenix.execute.MutationState - Abort successful
java.lang.ArrayIndexOutOfBoundsException: 127
at 
org.apache.phoenix.index.IndexMaintainer.initCachedState(IndexMaintainer.java:1614)
at org.apache.phoenix.index.IndexMaintainer.(IndexMaintainer.java:569)
at org.apache.phoenix.index.IndexMaintainer.create(IndexMaintainer.java:143)
at org.apache.phoenix.schema.PTableImpl.getIndexMaintainer(PTableImpl.java:1165)
at org.apache.phoenix.util.IndexUtil.generateIndexData(IndexUtil.java:325)
at org.apache.phoenix.execute.MutationState$1.next(MutationState.java:563)
at org.apache.phoenix.execute.MutationState$1.next(MutationState.java:521)
at org.apache.phoenix.execute.MutationState.send(MutationState.java:928)
at org.apache.phoenix.execute.MutationState.send(MutationState.java:1539)
at org.apache.phoenix.execute.MutationState.commit(MutationState.java:1362)
at org.apache.phoenix.jdbc.PhoenixConnection$3.call(PhoenixConnection.java:675)
at org.apache.phoenix.jdbc.PhoenixConnection$3.call(PhoenixConnection.java:671)
at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
at org.apache.phoenix.jdbc.PhoenixConnection.commit(PhoenixConnection.java:671)
at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:413)
at 

[jira] [Created] (PHOENIX-5542) UPSERT in VIEW fails using global connection if we have a view index on it and a global index on base table

2019-10-22 Thread Sandeep Pal (Jira)
Sandeep Pal created PHOENIX-5542:


 Summary: UPSERT in VIEW fails using global connection if we have a 
view index on it and a global index on base table
 Key: PHOENIX-5542
 URL: https://issues.apache.org/jira/browse/PHOENIX-5542
 Project: Phoenix
  Issue Type: Bug
 Environment: {code:java}
// code placeholder
{code}
Reporter: Sandeep Pal


Stacktrace:

 

 
{code:java}
0: jdbc:phoenix:stg2hdaas-mnds1-1-prd.eng.sfd> UPSERT INTO 
TEST.ODR_MUTABLE_MT_10_22_2_VIEW(ORGANIZATION_ID,CREATED_DATE,CREATED_BY,ONE,TWO,THREE)
 VALUES ('00D000SANP1',TO_DATE('1975-1-2 
12:00:00'),'004','15','24', '34');
[main] INFO org.apache.phoenix.execute.MutationState - Abort successful
java.lang.ArrayIndexOutOfBoundsException: 127
at 
org.apache.phoenix.index.IndexMaintainer.initCachedState(IndexMaintainer.java:1614)
at org.apache.phoenix.index.IndexMaintainer.(IndexMaintainer.java:569)
at org.apache.phoenix.index.IndexMaintainer.create(IndexMaintainer.java:143)
at org.apache.phoenix.schema.PTableImpl.getIndexMaintainer(PTableImpl.java:1165)
at org.apache.phoenix.util.IndexUtil.generateIndexData(IndexUtil.java:325)
at org.apache.phoenix.execute.MutationState$1.next(MutationState.java:563)
at org.apache.phoenix.execute.MutationState$1.next(MutationState.java:521)
at org.apache.phoenix.execute.MutationState.send(MutationState.java:928)
at org.apache.phoenix.execute.MutationState.send(MutationState.java:1539)
at org.apache.phoenix.execute.MutationState.commit(MutationState.java:1362)
at org.apache.phoenix.jdbc.PhoenixConnection$3.call(PhoenixConnection.java:675)
at org.apache.phoenix.jdbc.PhoenixConnection$3.call(PhoenixConnection.java:671)
at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
at org.apache.phoenix.jdbc.PhoenixConnection.commit(PhoenixConnection.java:671)
at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:413)
at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:393)
at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
at 
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:392)
at 
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:380)
at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1829)
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)
{code}
 

Steps to reproduce:


CREATE TABLE IF NOT EXISTS TEST.BASE_TABLE (
ORGANIZATION_ID CHAR(15) NOT NULL,
KEY_PREFIX CHAR(3) NOT NULL, 
CREATED_DATE DATE,
CREATED_BY CHAR(15),
CONSTRAINT PK PRIMARY KEY (
ORGANIZATION_ID,
KEY_PREFIX
)
) VERSIONS=1, MULTI_TENANT=true, IMMUTABLE_ROWS=true, REPLICATION_SCOPE=1;


CREATE VIEW IF NOT EXISTS TEST.VIEW_ON_BASE (
 ONE VARCHAR, 
 TWO VARCHAR, 
 THREE VARCHAR
 CONSTRAINT PKVIEW PRIMARY KEY
 (
 ONE, TWO
 )
)
AS SELECT * FROM TEST.BASE_TABLE WHERE KEY_PREFIX = '0CY';


CREATE INDEX IF NOT EXISTS VIEW_INDEX_ON_VIEW
ON TEST.VIEW_ON_BASE (THREE)
INCLUDE (ONE, TWO);


CREATE INDEX IF NOT EXISTS INDEX_ON_BASE_TABLE
ON TEST.BASE_TABLE (CREATED_DATE)
INCLUDE (CREATED_BY) ASYNC REPLICATION_SCOPE=1;

### UPSERT 
UPSERT INTO 
TEST.VIEW_ON_BASE(ORGANIZATION_ID,CREATED_DATE,CREATED_BY,ONE,TWO,THREE) VALUES 
('00D000SANP1',TO_DATE('1975-1-2 12:00:00'),'004','15','24', 
'34');

 

 



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


[jira] [Assigned] (PHOENIX-5495) Avoid server-server RPCs when row locks are held inside MetaDataEndpointImpl

2019-10-03 Thread Sandeep Pal (Jira)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-5495?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sandeep Pal reassigned PHOENIX-5495:


Assignee: Sandeep Pal

> Avoid server-server RPCs when row locks are held inside MetaDataEndpointImpl
> 
>
> Key: PHOENIX-5495
> URL: https://issues.apache.org/jira/browse/PHOENIX-5495
> Project: Phoenix
>  Issue Type: Improvement
>Affects Versions: 4.15.0, 5.1.0
>Reporter: Chinmay Kulkarni
>Assignee: Sandeep Pal
>Priority: Major
> Fix For: 4.15.1, 5.1.1
>
>
> At various spots in MetaDataEndpointImpl, we acquire row locks and then while 
> locks are held, do server-to-server RPC calls. This can lead to lock 
> starvation if RPCs take too long. We should decouple such interactions as 
> much as possible.



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


[jira] [Assigned] (PHOENIX-5296) Ensure store file reader refcount is zero at end of relevant unit tests

2019-08-27 Thread Sandeep Pal (Jira)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-5296?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sandeep Pal reassigned PHOENIX-5296:


Assignee: Sandeep Pal

> Ensure store file reader refcount is zero at end of relevant unit tests
> ---
>
> Key: PHOENIX-5296
> URL: https://issues.apache.org/jira/browse/PHOENIX-5296
> Project: Phoenix
>  Issue Type: Test
>Reporter: Andrew Purtell
>Assignee: Sandeep Pal
>Priority: Major
>  Labels: phoenix-hardening
> Fix For: 4.15.1, 5.1.1
>
>
> Unit and integration tests for functional areas where the implementation 
> wraps scanners and uses a delegate pattern should check at the end of the 
> test that no scanners were leaked (check that all scanners including the 
> inner scanners were properly closed) by testing that the store reader 
> reference count is zero on all stores. 
> HBASE-22459 will offer a new metric and API which exposes this information. 



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Updated] (PHOENIX-4743) ALTER TABLE ADD COLUMN for global index should not modify HBase metadata if failed

2019-08-26 Thread Sandeep Pal (Jira)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-4743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sandeep Pal updated PHOENIX-4743:
-
Attachment: PHOENIX-4743-4.x-HBase-1.3.patch

> ALTER TABLE ADD COLUMN for global index should not modify HBase metadata if 
> failed
> --
>
> Key: PHOENIX-4743
> URL: https://issues.apache.org/jira/browse/PHOENIX-4743
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Chinmay Kulkarni
>Assignee: Sandeep Pal
>Priority: Major
>  Labels: phoenix-hardening
> Attachments: PHOENIX-4743-4.x-HBase-1.3.patch, PHOENIX-4743.patch, 
> PHOENIX-4743.v1.patch, PHOENIX-4743.v3.patch
>
>  Time Spent: 2h
>  Remaining Estimate: 0h
>
> When you issue an "ALTER TABLE" for a global index to add a column, Phoenix 
> throws a SQLException, but the HBase metadata for the global index table is 
> still modified.
> Steps to reproduce:
>  * Create the base data table: 
> {code:java}
> create table if not exists z_base_table (id INTEGER not null primary key, 
> host VARCHAR(10), flag boolean);{code}
>  * Create a global index on top of this table: 
> {code:java}
> create index global_z_index on z_base_table(HOST);{code}
>  * Add a column to the global index table:
> {code:java}
> alter table global_z_index add cf1.age INTEGER;{code}
> This will throw an exception in Phoenix, but HBase metadata for the global 
> index table is still modified. Stack trace:
> {noformat}
> Error: ERROR 1010 (42M01): Not allowed to mutate table. Cannot add/drop 
> column referenced by VIEW columnName=GLOBAL_Z_INDEX (state=42M01,code=1010)
>  java.sql.SQLException: ERROR 1010 (42M01): Not allowed to mutate table. 
> Cannot add/drop column referenced by VIEW columnName=GLOBAL_Z_INDEX
>  at 
> org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:494)
>  at 
> org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:150)
>  at 
> org.apache.phoenix.schema.MetaDataClient.processMutationResult(MetaDataClient.java:3049)
>  at 
> org.apache.phoenix.schema.MetaDataClient.addColumn(MetaDataClient.java:3503)
>  at 
> org.apache.phoenix.schema.MetaDataClient.addColumn(MetaDataClient.java:3210)
>  at 
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableAddColumnStatement$1.execute(PhoenixStatement.java:1432)
>  at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:408)
>  at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:391)
>  at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
>  at 
> org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:390)
>  at 
> org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:378)
>  at 
> org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1825)
>  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{noformat}
>  



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Updated] (PHOENIX-4743) ALTER TABLE ADD COLUMN for global index should not modify HBase metadata if failed

2019-08-25 Thread Sandeep Pal (Jira)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-4743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sandeep Pal updated PHOENIX-4743:
-
Attachment: PHOENIX-4743.v3.patch

> ALTER TABLE ADD COLUMN for global index should not modify HBase metadata if 
> failed
> --
>
> Key: PHOENIX-4743
> URL: https://issues.apache.org/jira/browse/PHOENIX-4743
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Chinmay Kulkarni
>Assignee: Sandeep Pal
>Priority: Major
>  Labels: phoenix-hardening
> Attachments: PHOENIX-4743.patch, PHOENIX-4743.v1.patch, 
> PHOENIX-4743.v3.patch
>
>  Time Spent: 2h
>  Remaining Estimate: 0h
>
> When you issue an "ALTER TABLE" for a global index to add a column, Phoenix 
> throws a SQLException, but the HBase metadata for the global index table is 
> still modified.
> Steps to reproduce:
>  * Create the base data table: 
> {code:java}
> create table if not exists z_base_table (id INTEGER not null primary key, 
> host VARCHAR(10), flag boolean);{code}
>  * Create a global index on top of this table: 
> {code:java}
> create index global_z_index on z_base_table(HOST);{code}
>  * Add a column to the global index table:
> {code:java}
> alter table global_z_index add cf1.age INTEGER;{code}
> This will throw an exception in Phoenix, but HBase metadata for the global 
> index table is still modified. Stack trace:
> {noformat}
> Error: ERROR 1010 (42M01): Not allowed to mutate table. Cannot add/drop 
> column referenced by VIEW columnName=GLOBAL_Z_INDEX (state=42M01,code=1010)
>  java.sql.SQLException: ERROR 1010 (42M01): Not allowed to mutate table. 
> Cannot add/drop column referenced by VIEW columnName=GLOBAL_Z_INDEX
>  at 
> org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:494)
>  at 
> org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:150)
>  at 
> org.apache.phoenix.schema.MetaDataClient.processMutationResult(MetaDataClient.java:3049)
>  at 
> org.apache.phoenix.schema.MetaDataClient.addColumn(MetaDataClient.java:3503)
>  at 
> org.apache.phoenix.schema.MetaDataClient.addColumn(MetaDataClient.java:3210)
>  at 
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableAddColumnStatement$1.execute(PhoenixStatement.java:1432)
>  at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:408)
>  at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:391)
>  at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
>  at 
> org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:390)
>  at 
> org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:378)
>  at 
> org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1825)
>  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{noformat}
>  



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Updated] (PHOENIX-4743) ALTER TABLE ADD COLUMN for global index should not modify HBase metadata if failed

2019-08-25 Thread Sandeep Pal (Jira)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-4743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sandeep Pal updated PHOENIX-4743:
-
Attachment: (was: PHOENIX-4743.v2.patch)

> ALTER TABLE ADD COLUMN for global index should not modify HBase metadata if 
> failed
> --
>
> Key: PHOENIX-4743
> URL: https://issues.apache.org/jira/browse/PHOENIX-4743
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Chinmay Kulkarni
>Assignee: Sandeep Pal
>Priority: Major
>  Labels: phoenix-hardening
> Attachments: PHOENIX-4743.patch, PHOENIX-4743.v1.patch
>
>  Time Spent: 2h
>  Remaining Estimate: 0h
>
> When you issue an "ALTER TABLE" for a global index to add a column, Phoenix 
> throws a SQLException, but the HBase metadata for the global index table is 
> still modified.
> Steps to reproduce:
>  * Create the base data table: 
> {code:java}
> create table if not exists z_base_table (id INTEGER not null primary key, 
> host VARCHAR(10), flag boolean);{code}
>  * Create a global index on top of this table: 
> {code:java}
> create index global_z_index on z_base_table(HOST);{code}
>  * Add a column to the global index table:
> {code:java}
> alter table global_z_index add cf1.age INTEGER;{code}
> This will throw an exception in Phoenix, but HBase metadata for the global 
> index table is still modified. Stack trace:
> {noformat}
> Error: ERROR 1010 (42M01): Not allowed to mutate table. Cannot add/drop 
> column referenced by VIEW columnName=GLOBAL_Z_INDEX (state=42M01,code=1010)
>  java.sql.SQLException: ERROR 1010 (42M01): Not allowed to mutate table. 
> Cannot add/drop column referenced by VIEW columnName=GLOBAL_Z_INDEX
>  at 
> org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:494)
>  at 
> org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:150)
>  at 
> org.apache.phoenix.schema.MetaDataClient.processMutationResult(MetaDataClient.java:3049)
>  at 
> org.apache.phoenix.schema.MetaDataClient.addColumn(MetaDataClient.java:3503)
>  at 
> org.apache.phoenix.schema.MetaDataClient.addColumn(MetaDataClient.java:3210)
>  at 
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableAddColumnStatement$1.execute(PhoenixStatement.java:1432)
>  at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:408)
>  at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:391)
>  at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
>  at 
> org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:390)
>  at 
> org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:378)
>  at 
> org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1825)
>  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{noformat}
>  



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Updated] (PHOENIX-4743) ALTER TABLE ADD COLUMN for global index should not modify HBase metadata if failed

2019-08-24 Thread Sandeep Pal (Jira)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-4743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sandeep Pal updated PHOENIX-4743:
-
Attachment: PHOENIX-4743.v2.patch

> ALTER TABLE ADD COLUMN for global index should not modify HBase metadata if 
> failed
> --
>
> Key: PHOENIX-4743
> URL: https://issues.apache.org/jira/browse/PHOENIX-4743
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Chinmay Kulkarni
>Assignee: Sandeep Pal
>Priority: Major
>  Labels: phoenix-hardening
> Attachments: PHOENIX-4743.patch, PHOENIX-4743.v1.patch, 
> PHOENIX-4743.v2.patch
>
>  Time Spent: 2h
>  Remaining Estimate: 0h
>
> When you issue an "ALTER TABLE" for a global index to add a column, Phoenix 
> throws a SQLException, but the HBase metadata for the global index table is 
> still modified.
> Steps to reproduce:
>  * Create the base data table: 
> {code:java}
> create table if not exists z_base_table (id INTEGER not null primary key, 
> host VARCHAR(10), flag boolean);{code}
>  * Create a global index on top of this table: 
> {code:java}
> create index global_z_index on z_base_table(HOST);{code}
>  * Add a column to the global index table:
> {code:java}
> alter table global_z_index add cf1.age INTEGER;{code}
> This will throw an exception in Phoenix, but HBase metadata for the global 
> index table is still modified. Stack trace:
> {noformat}
> Error: ERROR 1010 (42M01): Not allowed to mutate table. Cannot add/drop 
> column referenced by VIEW columnName=GLOBAL_Z_INDEX (state=42M01,code=1010)
>  java.sql.SQLException: ERROR 1010 (42M01): Not allowed to mutate table. 
> Cannot add/drop column referenced by VIEW columnName=GLOBAL_Z_INDEX
>  at 
> org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:494)
>  at 
> org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:150)
>  at 
> org.apache.phoenix.schema.MetaDataClient.processMutationResult(MetaDataClient.java:3049)
>  at 
> org.apache.phoenix.schema.MetaDataClient.addColumn(MetaDataClient.java:3503)
>  at 
> org.apache.phoenix.schema.MetaDataClient.addColumn(MetaDataClient.java:3210)
>  at 
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableAddColumnStatement$1.execute(PhoenixStatement.java:1432)
>  at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:408)
>  at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:391)
>  at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
>  at 
> org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:390)
>  at 
> org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:378)
>  at 
> org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1825)
>  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{noformat}
>  



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Updated] (PHOENIX-4743) ALTER TABLE ADD COLUMN for global index should not modify HBase metadata if failed

2019-08-23 Thread Sandeep Pal (Jira)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-4743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sandeep Pal updated PHOENIX-4743:
-
Attachment: (was: PHOENIX-4743.v1.patch)

> ALTER TABLE ADD COLUMN for global index should not modify HBase metadata if 
> failed
> --
>
> Key: PHOENIX-4743
> URL: https://issues.apache.org/jira/browse/PHOENIX-4743
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Chinmay Kulkarni
>Assignee: Sandeep Pal
>Priority: Major
>  Labels: phoenix-hardening
> Attachments: PHOENIX-4743.patch
>
>  Time Spent: 2h
>  Remaining Estimate: 0h
>
> When you issue an "ALTER TABLE" for a global index to add a column, Phoenix 
> throws a SQLException, but the HBase metadata for the global index table is 
> still modified.
> Steps to reproduce:
>  * Create the base data table: 
> {code:java}
> create table if not exists z_base_table (id INTEGER not null primary key, 
> host VARCHAR(10), flag boolean);{code}
>  * Create a global index on top of this table: 
> {code:java}
> create index global_z_index on z_base_table(HOST);{code}
>  * Add a column to the global index table:
> {code:java}
> alter table global_z_index add cf1.age INTEGER;{code}
> This will throw an exception in Phoenix, but HBase metadata for the global 
> index table is still modified. Stack trace:
> {noformat}
> Error: ERROR 1010 (42M01): Not allowed to mutate table. Cannot add/drop 
> column referenced by VIEW columnName=GLOBAL_Z_INDEX (state=42M01,code=1010)
>  java.sql.SQLException: ERROR 1010 (42M01): Not allowed to mutate table. 
> Cannot add/drop column referenced by VIEW columnName=GLOBAL_Z_INDEX
>  at 
> org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:494)
>  at 
> org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:150)
>  at 
> org.apache.phoenix.schema.MetaDataClient.processMutationResult(MetaDataClient.java:3049)
>  at 
> org.apache.phoenix.schema.MetaDataClient.addColumn(MetaDataClient.java:3503)
>  at 
> org.apache.phoenix.schema.MetaDataClient.addColumn(MetaDataClient.java:3210)
>  at 
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableAddColumnStatement$1.execute(PhoenixStatement.java:1432)
>  at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:408)
>  at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:391)
>  at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
>  at 
> org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:390)
>  at 
> org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:378)
>  at 
> org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1825)
>  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{noformat}
>  



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Updated] (PHOENIX-4743) ALTER TABLE ADD COLUMN for global index should not modify HBase metadata if failed

2019-08-23 Thread Sandeep Pal (Jira)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-4743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sandeep Pal updated PHOENIX-4743:
-
Attachment: PHOENIX-4743.v1.patch

> ALTER TABLE ADD COLUMN for global index should not modify HBase metadata if 
> failed
> --
>
> Key: PHOENIX-4743
> URL: https://issues.apache.org/jira/browse/PHOENIX-4743
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Chinmay Kulkarni
>Assignee: Sandeep Pal
>Priority: Major
>  Labels: phoenix-hardening
> Attachments: PHOENIX-4743.patch, PHOENIX-4743.v1.patch
>
>  Time Spent: 2h
>  Remaining Estimate: 0h
>
> When you issue an "ALTER TABLE" for a global index to add a column, Phoenix 
> throws a SQLException, but the HBase metadata for the global index table is 
> still modified.
> Steps to reproduce:
>  * Create the base data table: 
> {code:java}
> create table if not exists z_base_table (id INTEGER not null primary key, 
> host VARCHAR(10), flag boolean);{code}
>  * Create a global index on top of this table: 
> {code:java}
> create index global_z_index on z_base_table(HOST);{code}
>  * Add a column to the global index table:
> {code:java}
> alter table global_z_index add cf1.age INTEGER;{code}
> This will throw an exception in Phoenix, but HBase metadata for the global 
> index table is still modified. Stack trace:
> {noformat}
> Error: ERROR 1010 (42M01): Not allowed to mutate table. Cannot add/drop 
> column referenced by VIEW columnName=GLOBAL_Z_INDEX (state=42M01,code=1010)
>  java.sql.SQLException: ERROR 1010 (42M01): Not allowed to mutate table. 
> Cannot add/drop column referenced by VIEW columnName=GLOBAL_Z_INDEX
>  at 
> org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:494)
>  at 
> org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:150)
>  at 
> org.apache.phoenix.schema.MetaDataClient.processMutationResult(MetaDataClient.java:3049)
>  at 
> org.apache.phoenix.schema.MetaDataClient.addColumn(MetaDataClient.java:3503)
>  at 
> org.apache.phoenix.schema.MetaDataClient.addColumn(MetaDataClient.java:3210)
>  at 
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableAddColumnStatement$1.execute(PhoenixStatement.java:1432)
>  at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:408)
>  at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:391)
>  at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
>  at 
> org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:390)
>  at 
> org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:378)
>  at 
> org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1825)
>  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{noformat}
>  



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Assigned] (PHOENIX-5067) Support for secure Phoenix cluster in Pherf

2019-05-06 Thread Sandeep Pal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-5067?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sandeep Pal reassigned PHOENIX-5067:


Assignee: Sandeep Pal  (was: Biju Nair)

> Support for secure Phoenix cluster in Pherf
> ---
>
> Key: PHOENIX-5067
> URL: https://issues.apache.org/jira/browse/PHOENIX-5067
> Project: Phoenix
>  Issue Type: Improvement
>Reporter: Biju Nair
>Assignee: Sandeep Pal
>Priority: Minor
> Attachments: PHOENIX-5067-4.x-HBase-1.1, 
> PHOENIX-5067-4.x-HBase-1.1.patch
>
>
> Currently Phoenix performance and functional testing tool {{Pherf}} doesn't 
> have options to pass in Kerberos principal and Keytab to connect to a secure 
> (Kerberized) Phoenix cluster. This prevents running the tool against a 
> Kerberized clusters.



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


[jira] [Assigned] (PHOENIX-4743) ALTER TABLE ADD COLUMN for global index should not modify HBase metadata if failed

2019-05-06 Thread Sandeep Pal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-4743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sandeep Pal reassigned PHOENIX-4743:


Assignee: Sandeep Pal

> ALTER TABLE ADD COLUMN for global index should not modify HBase metadata if 
> failed
> --
>
> Key: PHOENIX-4743
> URL: https://issues.apache.org/jira/browse/PHOENIX-4743
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Chinmay Kulkarni
>Assignee: Sandeep Pal
>Priority: Major
>
> When you issue an "ALTER TABLE" for a global index to add a column, Phoenix 
> throws a SQLException, but the HBase metadata for the global index table is 
> still modified.
> Steps to reproduce:
>  * Create the base data table: 
> {code:java}
> create table if not exists z_base_table (id INTEGER not null primary key, 
> host VARCHAR(10), flag boolean);{code}
>  * Create a global index on top of this table: 
> {code:java}
> create index global_z_index on z_base_table(HOST);{code}
>  * Add a column to the global index table:
> {code:java}
> alter table global_z_index add cf1.age INTEGER;{code}
> This will throw an exception in Phoenix, but HBase metadata for the global 
> index table is still modified. Stack trace:
> {noformat}
> Error: ERROR 1010 (42M01): Not allowed to mutate table. Cannot add/drop 
> column referenced by VIEW columnName=GLOBAL_Z_INDEX (state=42M01,code=1010)
>  java.sql.SQLException: ERROR 1010 (42M01): Not allowed to mutate table. 
> Cannot add/drop column referenced by VIEW columnName=GLOBAL_Z_INDEX
>  at 
> org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:494)
>  at 
> org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:150)
>  at 
> org.apache.phoenix.schema.MetaDataClient.processMutationResult(MetaDataClient.java:3049)
>  at 
> org.apache.phoenix.schema.MetaDataClient.addColumn(MetaDataClient.java:3503)
>  at 
> org.apache.phoenix.schema.MetaDataClient.addColumn(MetaDataClient.java:3210)
>  at 
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableAddColumnStatement$1.execute(PhoenixStatement.java:1432)
>  at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:408)
>  at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:391)
>  at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
>  at 
> org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:390)
>  at 
> org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:378)
>  at 
> org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1825)
>  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{noformat}
>  



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