phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Taylor (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-3547) Promote CATALOG.VIEW_INDEX_ID to an int
Date Thu, 08 Mar 2018 19:05:00 GMT

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

James Taylor commented on PHOENIX-3547:
---------------------------------------

Here's an overview of what would require to be changed:
- Instead of using {{MetaDataUtil.getViewIndexIdDataType()}} to get the data type of the VIEW_INDEX_ID,
get the data type from the schema (i.e. add PTable.getViewIndexIdType() method).
- Provide a means of specifying the data type as a DDL property when the physical table is
created. You'd do this by adding a TableProperty enum such as VIEW_INDEX_ID_TYPE and allow
it only to be set on a table.
- Add a new VIEW_INDEX_ID_TYPE column to SYSTEM.CATALOG (the DDL statement is in QueryConstants.java).
- Ensure this column value gets serialized (MetaDataClient.java through an UPSERT statement)
and deserialized (MetaDataEndPointImpl.java in buildTable) into the table row (using PShort
as the default).
- Pass the column value through PTableImpl.makePTable().

> Promote CATALOG.VIEW_INDEX_ID to an int
> ---------------------------------------
>
>                 Key: PHOENIX-3547
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3547
>             Project: Phoenix
>          Issue Type: New Feature
>            Reporter: Jeremy Huffman
>            Priority: Minor
>
> Increase the size of CATALOG.VIEW_INDEX_ID from smallint to int to support a large number
of indexed views on a single table.
> Per James: "The code would just need to be tolerant when reading the data if the length
is two byte short versus four byte int. At write time, we'd just always write an int."
> See: https://lists.apache.org/thread.html/22849e4fc73452cee3bea763cf6d5af7164dedcb44573ba6b9f452a2@%3Cuser.phoenix.apache.org%3E



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message