phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Taylor (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-2058) Check for existence and compatibility of columns being added in view
Date Thu, 02 Jul 2015 22:31:05 GMT

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

James Taylor commented on PHOENIX-2058:
---------------------------------------

Yes, correct - if the column cannot be added to any of the views (excluding views that have
diverged) then the entire operation should fail. That's what'll happen if you return the UNALLOWED_TABLE_MUTATION
from addRowsToChildViews  and check for and return early from the caller (i.e. before the
mutateRowsWithLocks call which is the commit).

bq. Currently if a view is divorced we don't add new base table columns to the divorced view,
but we will add if there are other views that are not divorced we add the column is that correct?
Yes, that's right.

> Check for existence and compatibility of columns being added in view
> --------------------------------------------------------------------
>
>                 Key: PHOENIX-2058
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2058
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: James Taylor
>            Assignee: Thomas D'Silva
>
> One check I realized we're not doing, but need to do, is ensuring that the column being
added by the base table doesn't already exist in the view. If the column does already exist,
ideally we can allow the addition to the base table if the type matches and the scale is null
or >= existing scale and the maxLength is null or >= existing maxLength. Also, if a
column is a PK column and it already exists in the view, the position in the PK must match.

> The fact that we've materialized a PTable for the view should make the addition of this
check easier.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message