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

Jeffrey Lyons commented on PHOENIX-1673:
----------------------------------------

Looking at picking this one up as a first try since it is tagged newbie and we 
need it fairly soon.

I'm thinking of keeping the tenantId stored as normal in a PName, since it has 
to be passed down as a string. Then once we know the table being operated on, 
checking the schema to figure out what type to try and convert the string to, 
and using the converted value for the rest of the operation. 

If the string representation can't be converted and the table is not 
multi-tenant, then we don't care. If it can't be parsed and the table is 
multi-tenant, then show no data (maybe an error?).

So basically the change will entail going through all the places that use 
tenantId and making sure if they are using the value to filter, that they check 
to see if they can convert it first, and then use that value. Then 
updating/adding tests to cover the changes. 

Any thoughts or things that I am missing? I am very open to suggestions.

> 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: 5.0.0, 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