GitHub user m2je opened a pull request:

    https://github.com/apache/phoenix/pull/334

    PHOENIX-3547 Supporting more number of indices per table.

    Currently the number of indices per Phoenix table is bound to maximum of 
65,535 (java.lang.Short) which is a limitation for applications requiring to 
have unlimited number of indices.
    This change will consider any new table created in Phoenix to support view 
index ids to be in the range of -9,223,372,036,854,775,808 to 
9,223,372,036,854,775,807 (java.lang.Long) which is undoubtedly big enough to 
cover this requirement.
    Any existing Phoenix table will still continue to support only maximum of 
65535 of indices.
    A new int column (VIEW_INDEX_ID_DATA_TYPE TINYINT) is added to 
SYSTEM.CATALOG to specify each Phoenix table's viewIndex data type.
    On each new Phoenix table creation the value for VIEW_INDEX_ID_DATA_TYPE 
will be set to Long while this value would be Short for any existing table.
    According to Protobuf documentation 
https://developers.google.com/protocol-buffers/docs/proto#updating we can 
change the type of viewIndexId from int32 to int64 and maintain the backward 
compatibility for older clients. We did a manual verification for this scenario 
by
    creating a view with the old client and verify the new client is able to 
connect and read/write to the view after changing the viewIndexId type and 
adding the viewIndexType.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/m2je/phoenix PHOENIX-3547

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/phoenix/pull/334.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #334
    
----
commit 4b39872603b801b7c477dceb778cffc9475f6704
Author: Mahdi Salarkia <msalarkia@...>
Date:   2018-08-21T17:38:49Z

    PHOENIX-3547 Supporting more number of indices per table.
    
    Currently the number of indices per Phoenix table is bound to maximum of 
65,535 (java.lang.Short) which is a limitation for applications requiring to 
have unlimited number of indices.
    This change will consider any new table created in Phoenix to support view 
index ids to be in the range of -9,223,372,036,854,775,808 to 
9,223,372,036,854,775,807 (java.lang.Long) which is undoubtedly big enough to 
cover this requirement.
    Any existing Phoenix table will still continue to support only maximum of 
65535 of indices.
    A new int column (VIEW_INDEX_ID_DATA_TYPE TINYINT) is added to 
SYSTEM.CATALOG to specify each Phoenix table's viewIndex data type.
    On each new Phoenix table creation the value for VIEW_INDEX_ID_DATA_TYPE 
will be set to Long while this value would be Short for any existing table.
    According to Protobuf documentation 
https://developers.google.com/protocol-buffers/docs/proto#updating we can 
change the type of viewIndexId from int32 to int64 and maintain the backward 
compatibility for older clients. We did a manual verification for this scenario 
by
    creating a view with the old client and verify the new client is able to 
connect and read/write to the view after changing the viewIndexId type and 
adding the viewIndexType.

----


---

Reply via email to