phoenix-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Swaroopa Kadam (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-4717) Document restrictions on adding primary key columns
Date Fri, 10 May 2019 21:20:00 GMT

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

Swaroopa Kadam commented on PHOENIX-4717:
-----------------------------------------

[~dbwong] FYI. :DĀ 

> Document restrictions on adding primary key columns
> ---------------------------------------------------
>
>                 Key: PHOENIX-4717
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4717
>             Project: Phoenix
>          Issue Type: Task
>            Reporter: Thomas D'Silva
>            Priority: Major
>
> For both views and tables
> 1. We allow nullable columns in the PK, but only if they're variable length. Variable
length types may be null, since we use a null-byte terminator (which is a disallowed character
in variable length types). Fixed width types do not have a way of representing null.
> There is the following TODO in PColumnImpl.init 
> // TODO: we may be able to allow this for columns at the end of the PK
> 2. We disallow adding a column to the PK 
>    a) if the last PK column is VARBINARY 
>    b) if the last PK column is fixed width and nullableĀ //not sure if this is possible
currently because of #1
>    c) if the column is not nullable (in order to handle existing rows)
> For views:
> 1. We disallow adding a column to the PK If the last pk column is variable length
> If the last pk column is variable length then we read all the bytes of the rowkey without
looking for a separator byte so we cannot add a pk column to a view if the last pk column
of the parent is variable length (see https://issues.apache.org/jira/browse/PHOENIX-978?focusedCommentId=14617847&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14617847)



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

Mime
View raw message