Aggarwal-Raghav opened a new pull request, #6749:
URL: https://github.com/apache/hive/pull/6749

   ### What changes were proposed in this pull request?
   [HIVE-29877](https://issues.apache.org/jira/browse/HIVE-29877) 
   Previously, the router expected URLs to match an exact length and crashed if 
an Iceberg client sent a `{prefix}` (like my_catalog). This PR introduces a 
mathematical offset that dynamically calculates the length of any prefix, 
allowing the server to gracefully accept and route multi-segment prefixes. 
   
   
   ### Why are the changes needed?
   - To comply with the OpenAPI specification and HMS Rest catalog exposes 
`{prefix}` in `../iceberg/v1/config`
   - Databricks Unity IRC follows the following standard where 
`catalogs/<uc_catalog_name>` can be prefix.
   ```
   
https://<workspace-instance>/api/2.1/unity-catalog/iceberg-rest/v1/catalogs/<uc_catalog_name>/namespaces/<uc_schema_name>/tables/<uc_table_name>
   ```
   - Spark client can inject prefix using `--conf 
spark.sql.catalog.local.prefix=my_test_prefix`
   
   
   ### Does this PR introduce _any_ user-facing change?
   Yes (Positive Impact): Users can now successfully connect strict Iceberg 
REST clients that inject custom multi-segment prefixes into the HTTP paths 
without hitting HTTP 400 errors.
   
   ### How was this patch tested?
   Write Junit test and spark docker image testing (Screenshot attached below)
   


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