Skip to content

Commit

Permalink
fix warning: remove deprecated method
Browse files Browse the repository at this point in the history
  • Loading branch information
goldmedal committed May 31, 2024
1 parent a609530 commit 8c76b92
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion datafusion/core/src/datasource/file_format/object_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ use crate::execution::context::SessionState;
use crate::prelude::SessionContext;

use async_trait::async_trait;
use aws_config::BehaviorVersion;
use aws_credential_types::provider::ProvideCredentials;
use object_store::aws::{AmazonS3Builder, AwsCredential};
use object_store::gcp::GoogleCloudStorageBuilder;
Expand Down Expand Up @@ -64,7 +65,7 @@ pub(crate) async fn get_s3_object_store_builder(
builder = builder.with_token(session_token);
}
} else {
let config = aws_config::from_env().load().await;
let config = aws_config::load_defaults(BehaviorVersion::latest()).await;
if let Some(region) = config.region() {
builder = builder.with_region(region.to_string());
}
Expand Down

0 comments on commit 8c76b92

Please sign in to comment.