nastra commented on code in PR #12197:
URL: https://github.com/apache/iceberg/pull/12197#discussion_r1995610827


##########
core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java:
##########
@@ -1424,18 +1241,26 @@ public View create() {
               .properties(properties)
               .build();
 
+      AuthSession contextualSession = authManager.contextualSession(context, 
catalogAuth);
       LoadViewResponse response =
-          client.post(
-              paths.views(identifier.namespace()),
-              request,
-              LoadViewResponse.class,
-              headers(context),
-              ErrorHandlers.viewErrorHandler());
-
-      AuthSession session = tableSession(response.config(), session(context));
+          client
+              .withAuthSession(contextualSession)
+              .post(
+                  paths.views(identifier.namespace()),
+                  request,
+                  LoadViewResponse.class,
+                  Map.of(),
+                  ErrorHandlers.viewErrorHandler());
+
+      Map<String, String> tableConf = response.config();
+      AuthSession session = authManager.tableSession(identifier, tableConf, 
contextualSession);

Review Comment:
   ```suggestion
         AuthSession tableSession = authManager.tableSession(identifier, 
tableConf, contextualSession);
   ```



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