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

James Taylor commented on PHOENIX-4623:
---------------------------------------

We rely on the schema of tables and indexes to match so that we can set the 
forward and backward linking rows atomically (our split policy will prevent a 
split between anything but tenant_id+schema_name). This will become important 
when we have a splittable system catalog. What's the schema of the index rows? 
I don't think we use the {{_IDX_SCH.TABLE}} name, but instead the schema of the 
table on which the index is being added.

For this particular method, {{MetaDataUtil.getViewIndexName}}(), since it's 
only called by one test, I agree that it'd be better to get rid of it. Also, 
probably good to use a non null schema name in the test too so we have better 
coverage.

Can you think of any negative ramifications if we keep 
MetaDataUtil.getIndexPhysicalName() as it is, [~tdsilva]?

> Inconsistent physical view index name
> -------------------------------------
>
>                 Key: PHOENIX-4623
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4623
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.13.0
>            Reporter: Akshita Malhotra
>            Priority: Major
>              Labels: easyfix
>             Fix For: 4.15.0
>
>
> The physical view indexes are incorrectly named when table has a schema. For 
> instance, if a table name is "SCH.TABLE", during creation the physical index 
> table is named as "_IDX_SCH.TABLE" which doesn't look right. In case 
> namespaces are enabled, the physical index table is named as "SCH:_IDX_TABLE"
> The client APIs on the other hand such as 
> MetaDataUtil.getViewIndexName(String schemaName, String tableName) API to 
> retrieve the phyisical view index name returns "SCH._IDX_TABLE" which as per 
> convention returns the right name but functionally leads to wrong results as 
> this is not how the physical indexes are named during construction.
>  
>  



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

Reply via email to