gokceni commented on a change in pull request #1170:
URL: https://github.com/apache/phoenix/pull/1170#discussion_r605879621
##########
File path:
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
##########
@@ -2152,10 +2201,15 @@ public void createTable(RpcController controller,
CreateTableRequest request,
}
}
- private long getViewIndexSequenceValue(PhoenixConnection connection,
String tenantIdStr, PTable parentTable, PName physicalName) throws SQLException
{
+ private long getViewIndexSequenceValue(PhoenixConnection connection,
String tenantIdStr, PTable parentTable) throws SQLException {
int nSequenceSaltBuckets =
connection.getQueryServices().getSequenceSaltBuckets();
-
- SequenceKey key = MetaDataUtil.getViewIndexSequenceKey(tenantIdStr,
physicalName,
+ // parentTable is parent of the view index which is the view.
+ // Since parent is the view, the parentTable.getParentLogicalName()
returns the logical full name of the base table
+ PName parentName = parentTable.getParentLogicalName();
Review comment:
There was only one place calling this function and it was using
parentTable.getPhysicalName(); as physicalName. That mapped to full name of
base table like SC1.TBL_1. getParentLogicalName returns the same now. But
parentTable.getPhysicalName returns SC1.NEW_PHYSICALNAME_TBL1 which we don't.
I run all view related IT tests. Is there any other tests you would like me
to run to check for collusions?
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]