palashc commented on code in PR #1823:
URL: https://github.com/apache/phoenix/pull/1823#discussion_r1488546718


##########
phoenix-core-client/src/main/java/org/apache/phoenix/util/ViewUtil.java:
##########
@@ -484,7 +484,8 @@ public static void addIndexesFromParent(PhoenixConnection 
connection, PTable vie
                             .setTableName(modifiedIndexName)
                             .setViewStatement(viewStatement)
                             
.setUpdateCacheFrequency(view.getUpdateCacheFrequency())
-                            .setTenantId(view.getTenantId())
+                            //retain the tenantId from the index being 
inherited
+                            .setTenantId(index.getTenantId())

Review Comment:
   Added the test. 
   
   > I think they will now point to the same entry in the metadata cache.
   
   Yes. There was only one entry in the cache for the index with modified name 
and tenant id is null. Both tenant view PTables also have the index ptable with 
the modified name and no tenant id. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to