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

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

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

    https://github.com/apache/phoenix/pull/104#discussion_r36559583
  
    --- Diff: 
phoenix-core/src/test/java/org/apache/phoenix/util/TenantIdByteConversionTest.java
 ---
    @@ -0,0 +1,275 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + * http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.phoenix.util;
    +
    +import static org.junit.Assert.assertArrayEquals;
    +import static org.junit.Assert.fail;
    +
    +import java.sql.SQLException;
    +import java.util.Collection;
    +import java.util.List;
    +
    +import org.apache.phoenix.schema.*;
    +import org.apache.phoenix.schema.types.*;
    +import org.apache.phoenix.schema.RowKeySchema.RowKeySchemaBuilder;
    +import org.junit.Test;
    +import org.junit.runner.RunWith;
    +import org.junit.runners.Parameterized;
    +import org.junit.runners.Parameterized.Parameters;
    +
    +import com.google.common.collect.Lists;
    +import org.mockito.Mockito;
    +
    +/*Test the getTenantIdBytes method in ScanUtil*/
    +@RunWith(Parameterized.class)
    +public class TenantIdByteConversionTest {
    --- End diff --
    
    Also, can you test non-VARCHAR tenant ids with tenant-specific secondary 
indexes and sequences?


> 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