deniskuzZ commented on code in PR #6749:
URL: https://github.com/apache/hive/pull/6749#discussion_r4024628689


##########
standalone-metastore/metastore-rest-catalog/src/main/java/org/apache/iceberg/rest/HMSCatalogAdapter.java:
##########
@@ -189,26 +192,60 @@ enum Route {
       }
 
       this.requestClass = requestClass;
-
       this.requiredLength = parts.size();
       this.requirements = requirementsBuilder.build();
       this.variables = variablesBuilder.build();
     }
 
+    /**
+     * Shift index to skip the prefix.
+     */
+    private int mappedIndex(int baseIndex, int offset) {

Review Comment:
   ````
   /** Index of the first prefix segment, right after "v1". */
   private static final int PREFIX_START = 1;`
   
   /** Maps a template index to a request-path index, skipping prefix segments. 
*/
   private static int mappedIndex(int templateIndex, int prefixLength) {
     return templateIndex < PREFIX_START ? templateIndex : templateIndex + 
prefixLength;
   }
   
   /** Number of extra segments in the request, i.e. the prefix length. */
   private int prefixLength(List<String> requestPath) {
     return requestPath.size() - requiredLength;
   }
   ````



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to