kadirozde commented on a change in pull request #531: PHOENIX-5385: 
GlobalIndexChecker coproc doesn't load on view indexes
URL: https://github.com/apache/phoenix/pull/531#discussion_r303727746
 
 

 ##########
 File path: 
phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java
 ##########
 @@ -916,17 +928,21 @@ private void send(Iterator<TableRef> tableRefIterator) 
throws SQLException {
                 long mutationTimestamp = scn == null ?
                     (table.isTransactional() == true ? 
HConstants.LATEST_TIMESTAMP : EnvironmentEdgeManager.currentTimeMillis())
                         : scn;
-                Iterator<Pair<PName, List<Mutation>>>
+                Iterator<Pair<PTable, List<Mutation>>>
                         mutationsIterator =
                         addRowMutations(tableRef, multiRowMutationState, 
mutationTimestamp,
                                 serverTimestamp, false, sendAll);
                 // build map from physical table to mutation list
                 boolean isDataTable = true;
                 while (mutationsIterator.hasNext()) {
-                    Pair<PName, List<Mutation>> pair = 
mutationsIterator.next();
-                    PName hTableName = pair.getFirst();
+                    Pair<PTable, List<Mutation>> pair = 
mutationsIterator.next();
+                    PTable logicalTable = pair.getFirst();
                     List<Mutation> mutationList = pair.getSecond();
-                    TableInfo tableInfo = new TableInfo(isDataTable, 
hTableName, tableRef);
+                    PName logicalFullName = 
PNameFactory.newName(SchemaUtil.getTableName(
+                            logicalTable.getSchemaName().getString(),
+                            logicalTable.getTableName().getString()));
+                    TableInfo tableInfo = new TableInfo(isDataTable, 
logicalTable.getPhysicalName()
 
 Review comment:
   So, we get the table name and schema from the PTable object in order to form 
a PName object and store the  reference to the PName object in a TableInfo 
object. Then later we get the PName object from the TableInfo object in order 
to get the PTable object. Should we store the PTable object reference in the 
TableInfo object, instead of the PName object reference to eliminate this 
back-and_forth? @gjacoby126, do you have any comment on this? I think we can 
even eliminate the PTable Info object and use PTable instead. I am not 
suggesting that we should do it now but in a separate jira.

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to