danielcweeks commented on code in PR #12582: URL: https://github.com/apache/iceberg/pull/12582#discussion_r2012401126
########## aws/src/main/java/org/apache/iceberg/aws/RESTSigV4AuthManager.java: ########## @@ -61,20 +61,29 @@ public RESTSigV4AuthSession catalogSession( } @Override - public AuthSession contextualSession(SessionCatalog.SessionContext context, AuthSession parent) { + public RESTSigV4AuthSession contextualSession( + SessionCatalog.SessionContext context, AuthSession parent) { AwsProperties contextProperties = - new AwsProperties(RESTUtil.merge(catalogProperties, context.properties())); + new AwsProperties( + RESTUtil.merge( + catalogProperties, + // Use both context properties and credentials to create the AwsProperties instance + RESTUtil.merge( + Optional.ofNullable(context.properties()).orElseGet(Map::of), + Optional.ofNullable(context.credentials()).orElseGet(Map::of)))); + RESTSigV4AuthSession sigV4Parent = (RESTSigV4AuthSession) parent; Review Comment: If we're going to be hard-casting, we should probably include a precondition check to verify we're the right session type. -- 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...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org