phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas D'Silva (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-4737) Use position as column qualifier for APPEND_ONLY_SCHEMA
Date Mon, 14 May 2018 23:47:00 GMT

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

Thomas D'Silva commented on PHOENIX-4737:
-----------------------------------------

Do we need the check to prevent adding columns to a base table?

I think the following code in addColumnsAndTablePropertiesToChildViews will add the base table
column to the correct ordinal position in the view , right?

{code}

else {
 int newOrdinalPosition = p.ordinalPosition;
 /*
 * For a non-diverged view, we need to make sure that the base table column
 * is added at the right position.
 */
 if (ordinalPositionList.size() == 0) {
 ordinalPositionList.setOffset(newOrdinalPosition);
 ordinalPositionList.addColumn(columnKey, newOrdinalPosition);
 for (PColumn col : view.getColumns()) {
 int ordinalPos = getOrdinalPosition(view, col);
 if (ordinalPos >= newOrdinalPosition) {
 // increment ordinal position of columns by 1
 int updatedPos = ordinalPos + 1;
 ordinalPositionList.addColumn(getColumnKey(viewKey, col), updatedPos);
 } 
 }
 } else {
 ordinalPositionList.addColumn(columnKey, newOrdinalPosition);
 }
 mutationsForAddingColumnsToViews.add(viewColumnPut);
 }

{code}

 

> Use position as column qualifier for APPEND_ONLY_SCHEMA
> -------------------------------------------------------
>
>                 Key: PHOENIX-4737
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4737
>             Project: Phoenix
>          Issue Type: Improvement
>            Reporter: James Taylor
>            Assignee: James Taylor
>            Priority: Major
>             Fix For: 4.14.0, 5.0.0
>
>         Attachments: PHOENIX-4737_v1.patch
>
>
> An easy way to prevent gaps in the column encoding used to define column qualifiers is
to use the position to define the column qualifier. This only works if:
>  * You disallow removes of columns
>  * You disallow adding columns to the base table
> This is pretty easy to enforce and will enable column encoding to be used effectively
when a base table has many views.



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

Mime
View raw message