[
https://issues.apache.org/jira/browse/PHOENIX-5958?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17157587#comment-17157587
]
Chinmay Kulkarni commented on PHOENIX-5958:
-------------------------------------------
This problem exists irrespective of the rollback config. It is probably because
diverged views created by old clients do not have the EXCLUDED_COLUMN linking
row and so after upgrading to 4.15+, those views are considered to be
non-diverged. Ideally, we should handle porting all diverged views to the new
design in the upgrade path and/or add logic on the server-side to figure out
pre-existing diverged views that had been created via old clients.
Diverged views created via old clients can be found with some combination of
the BASE_COLUMN_COUNT=-100 logic and comparing the columns present in the
parent vs. child to find what are the exact columns that are missing in the
child view.
[~yanxinyi] [~gjacoby] [~abhishek.chouhan] [~tdsilva]
> Diverged view created from an older client still sees dropped column data
> -------------------------------------------------------------------------
>
> Key: PHOENIX-5958
> URL: https://issues.apache.org/jira/browse/PHOENIX-5958
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 4.15.0
> Reporter: Chinmay Kulkarni
> Priority: Blocker
> Fix For: 4.16.0
>
>
> By "diverged view" I mean creating a view and then dropping one of the
> inherited columns from the view. Steps to reproduce:
> Start a 4.x server and connect with a pre-4.15 (I tried a 4.14.3) client
> # CREATE TABLE IF NOT EXISTS S.T (A INTEGER PRIMARY KEY, B INTEGER);
> # CREATE VIEW IF NOT EXISTS S.V (new_col INTEGER) AS SELECT * FROM S.T;
> # UPSERT INTO S.T VALUES(1,2);
> # ALTER VIEW S.V DROP COLUMN B;
> # SELECT * FROM S.T; gives:
> |A|B|
> |1|2|
> # SELECT * FROM S.V; gives:
> |B|A|NEW_COL|
> |2|1|null|
> Though the column 'B' has been dropped from the view. This does not happen
> for a 4.x client.
> The problem is mostly due to changes introduced by
> [PHOENIX-4893|https://issues.apache.org/jira/browse/PHOENIX-4893].
--
This message was sent by Atlassian Jira
(v8.3.4#803005)