If we want to look up the PTable of a tenant view we currently need to create a tenant specific connection and call PhoenixRuntime.getTable(). This could be inefficient if we need to create millions of tenant specific connections.
We could instead just pass in the tenant id and use a global connection
getTable(Connection conn, String tenantId, String fullTableName, long timestamp)
Insread of using the scn from the connection to set the clientTimestamp, we would use the passed in timestamp.
If the table isn't cached we would need to make a rpc to fetch the table from SYSTEM.CATALOG
FYI Andrew Purtell