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

Sergey Soldatov commented on PHOENIX-4546:
------------------------------------------

I'm not sure whether it's a valid case. According to our documentation 
{noformat}
Deletes of rows in immutable tables are allowed with some restrictions if there 
are indexes on the table.
{noformat}
Doesn't it sound like we can't delete from immutable tables if there are any 
index table? [~jamestaylor] could you please confirm that I understand it 
correctly?

This particular patch would break even a simple select on the table with 
immutable rows:
{noformat}
0: jdbc:phoenix:> CREATE TABLE IF NOT EXISTS  A (ID INTEGER PRIMARY 
KEY,double_id DOUBLE,varchar_id VARCHAR (30));
No rows affected (1.277 seconds)
0: jdbc:phoenix:> ALTER TABLE A  set IMMUTABLE_ROWS=true;
No rows affected (0.094 seconds)
0: jdbc:phoenix:>
0: jdbc:phoenix:> CREATE INDEX IF NOT EXISTS index_column_varchar_id ON A 
(varchar_id);
No rows affected (7.298 seconds)
0: jdbc:phoenix:> CREATE INDEX IF NOT EXISTS index_column_double_id ON A 
(double_id);
No rows affected (6.28 seconds)
0: jdbc:phoenix:> UPSERT INTO A VALUES (9000000,0.5,'Sample text extra');
1 row affected (0.067 seconds)
0: jdbc:phoenix:> select * from a;
+----------+------------+-------------+
|    ID    | DOUBLE_ID  | VARCHAR_ID  |
+----------+------------+-------------+
| 9000000  | null       |             |
+----------+------------+-------------+
1 row selected (0.042 seconds)
{noformat}
because instead of returning projected column in ColumnRef now we return 
expressions for double and varchar. 

> Projected immutable table cannot be read through ProjectedColumnExpression
> --------------------------------------------------------------------------
>
>                 Key: PHOENIX-4546
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4546
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Romil Choksi
>            Assignee: Ankit Singhal
>            Priority: Major
>             Fix For: 5.0.0, 4.14.0
>
>         Attachments: PHOENIX-4546.patch
>
>




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

Reply via email to