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

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

Excellent, [~tdsilva]. Nice work. If it's a PK column, then the slot position 
has to match (I see you have that check already). Theoretically it's ok for the 
ordinal position to not match between the table and the view and I think this 
is ok (but I could be convinced otherwise too). Is that how you have it working 
now? Do you just not do a put for the ordinal position KeyValue if it's an 
existing column? Do you do a put for other KeyValue columns like maxLength 
and/or scale? Or perhaps it's ok not to as long as they're compatible.

Looks like you're almost done, no?

> 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
>         Attachments: PHOENIX-2058-WIP.patch, PHOENIX-2058.wip.2.patch
>
>
> 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)

Reply via email to