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

ASF GitHub Bot commented on PHOENIX-1673:
-----------------------------------------

Github user JeffreyLyonsD2L commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/104#discussion_r36590856
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/phoenix/execute/BaseQueryPlan.java ---
    @@ -204,8 +204,18 @@ public final ResultIterator iterator(final List<? 
extends SQLCloseable> dependen
             } else {
                 ScanUtil.setTimeRange(scan, context.getScanTimeRange());
             }
    -        
    -        ScanUtil.setTenantId(scan, connection.getTenantId() == null ? null 
: connection.getTenantId().getBytes());
    +        byte[] tenantIdBytes;
    --- End diff --
    
    In both cases we are getting it from the connection. In the if {} block we 
are using the table to figure out the RowKeySchema so we know what to convert 
it into.
    
    The else might be unnecessary, I leaned towards keeping it in because then 
it mimicked the old behaviour in the case where you were scanning a regular 
table on a tenant-specific connection.


> Allow tenant ID to be of any integral data type
> -----------------------------------------------
>
>                 Key: PHOENIX-1673
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1673
>             Project: Phoenix
>          Issue Type: Improvement
>    Affects Versions: 4.3.0
>            Reporter: Mark Tse
>              Labels: Newbie, multi-tenant
>             Fix For: 4.4.1
>
>
> When creating multi-tenant tables and views, the column that identifies the 
> tenant (first primary key column) must be of type 'VARCHAR' or 'CHAR'.
> It should be possible to relax this restriction to use any integral data 
> type. The tenant ID from the connection property can be converted based on 
> the data type of the first primary key column.



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

Reply via email to