adutra commented on PR #1772:
URL: https://github.com/apache/polaris/pull/1772#issuecomment-2936311136

   After chatting with @fivetran-kostaszoumpatianos we were finally able to 
reproduce consistently: the issue only happens with credential vending.
   
   The following test, declared in `PolarisRestCatalogIntegrationTest` 
reproduces the issue:
   
   ```java
     @RestCatalogConfig({"header.X-Iceberg-Access-Delegation", 
"vended-credentials"})
     @Test
     public void createTableFails() {
       Namespace ns = Namespace.of("ns1");
       if (!restCatalog.namespaceExists(ns)) {
         restCatalog.createNamespace(ns);
       }
       restCatalog
           .buildTable(
               TableIdentifier.of(ns, "history"),
               new Schema(
                   List.of(
                       Types.NestedField.required(1, "id", 
Types.IntegerType.get()))))
           .withSortOrder(SortOrder.unsorted())
           .withPartitionSpec(PartitionSpec.unpartitioned())
           .withProperty("stage-create", "true")
           .create();
     }
   ```
   
   The error is:
   
   ```
   Server error: IllegalStateException: 
invalid_key_for_passthrough_resolved_path: key={} passthroughPaths={}, [ns1, 
{ns1.history=entityNames:[ns1, 
history];lastEntityType:TABLE_LIKE;isOptional:true}]
   org.apache.iceberg.exceptions.ServiceFailureException: Server error: 
IllegalStateException: invalid_key_for_passthrough_resolved_path: key={} 
passthroughPaths={}, [ns1, {ns1.history=entityNames:[ns1, 
history];lastEntityType:TABLE_LIKE;isOptional:true}]
        at 
org.apache.iceberg.rest.ErrorHandlers$DefaultErrorHandler.accept(ErrorHandlers.java:241)
        at 
org.apache.iceberg.rest.ErrorHandlers$TableErrorHandler.accept(ErrorHandlers.java:123)
        at 
org.apache.iceberg.rest.ErrorHandlers$TableErrorHandler.accept(ErrorHandlers.java:107)
        at org.apache.iceberg.rest.HTTPClient.throwFailure(HTTPClient.java:215)
        at org.apache.iceberg.rest.HTTPClient.execute(HTTPClient.java:299)
        at org.apache.iceberg.rest.BaseHTTPClient.post(BaseHTTPClient.java:88)
        at 
org.apache.iceberg.rest.RESTSessionCatalog$Builder.create(RESTSessionCatalog.java:771)
        at 
org.apache.polaris.service.it.test.PolarisRestCatalogIntegrationTest.createTableFails(PolarisRestCatalogIntegrationTest.java:650)
   ```


-- 
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: issues-unsubscr...@polaris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to