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

James Taylor commented on PHOENIX-2565:
---------------------------------------

Thanks for the patch, [~tdsilva]! Feel free to commit it to the encodecolumns 
branch. Here are a few comments/questions:
- What's the scoop with the 
ReplaceArrayColumnWithKeyValueColumnExpressionVisitor in IndexMaintainer and 
ArrayColumnExpression needing to keep two types of expressions? Can't we just 
push the correct one into the IndexMaintainer based on the PTable storage 
scheme?
{code}
+        this.arrayExpression = new KeyValueColumnExpression(column, cf, cf);
+        this.origKVExpression = new KeyValueColumnExpression(column, 
displayName, encodedColumnName);
{code}
- Looks like the imports in ExpressionType were changed to a *. Maybe we should 
keep them explicit (and increase our # of imports before turning it into a *)? 
Otherwise merges back to other branches may get painful?
{code}
+import org.apache.phoenix.expression.function.*;
{code}
- Don't think you need this method override in SingleKeyValueComparisonFilter  
as it doesn't do anything:
{code}
+    @Override
+    protected Boolean evaluate(Tuple input) {
+        return super.evaluate(input);
+    }
{code}

> Store data for immutable tables in single KeyValue
> --------------------------------------------------
>
>                 Key: PHOENIX-2565
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2565
>             Project: Phoenix
>          Issue Type: Improvement
>            Reporter: James Taylor
>            Assignee: Thomas D'Silva
>             Fix For: 4.9.0
>
>         Attachments: PHOENIX-2565-wip.patch, PHOENIX-2565.patch
>
>
> Since an immutable table (i.e. declared with IMMUTABLE_ROWS=true) will never 
> update a column value, it'd be more efficient to store all column values for 
> a row in a single KeyValue. We could use the existing format we have for 
> variable length arrays.
> For backward compatibility, we'd need to support the current mechanism. Also, 
> you'd no longer be allowed to transition an existing table to/from being 
> immutable. I think the best approach would be to introduce a new IMMUTABLE 
> keyword and use it like this:
> {code}
> CREATE IMMUTABLE TABLE ...
> {code}



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

Reply via email to