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

Maryann Xue commented on PHOENIX-3351:
--------------------------------------

Some minor changes:
1. Can {{Integer numSysCols}} in setValues() be {{int}} instead? Think "0" is 
sufficient to express "no sys columns".
2. Instead of
{code}
-        byte[][] values = new byte[columnIndexes.length][];
+        byte[][] values = null;
{code}
and moving initialization of "values" into the if-else block, you can add a 
variable at the beginning like {{int size = 
(tableRef.getTable().isMultiTenant() ? 1 : 0) + 
(tableRef.getTable().getViewIndexId() != null ? 1 : 0);}}, so that the code in 
{{if(prefixSysColValues)}} block can be further simplified. This also assigns 
with the coding style for these columns elsewhere in Phoenix.
 
So would we still need these changes if we can make use of system columns in 
Calcite?

> Implement TODOs in PhoenixTableModify#upsert to allow writes to tenant 
> specific tables
> --------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-3351
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3351
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: Rajeshbabu Chintaguntla
>            Assignee: Rajeshbabu Chintaguntla
>         Attachments: PHOENIX-3351_WIP.patch
>
>
> While running UDF IT tests came across this TODO which is necessary to 
> implement for tenant specific, local or view indexes tests to pass.
> {noformat}
>             // TODO TenantId, ViewIndexId, UpdatableViewColumns
>             final List<PColumn> mappedColumns = 
> targetTable.tableMapping.getMappedColumns();
> {noformat}



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

Reply via email to