devinjdangelo commented on code in PR #8426:
URL: https://github.com/apache/arrow-datafusion/pull/8426#discussion_r1417296255


##########
datafusion-cli/src/object_storage.rs:
##########
@@ -30,20 +30,21 @@ use url::Url;
 
 pub async fn get_s3_object_store_builder(
     url: &Url,
-    cmd: &CreateExternalTable,
+    cmd: &mut CreateExternalTable,
 ) -> Result<AmazonS3Builder> {
     let bucket_name = get_bucket_name(url)?;
     let mut builder = 
AmazonS3Builder::from_env().with_bucket_name(bucket_name);
 
     if let (Some(access_key_id), Some(secret_access_key)) = (
-        cmd.options.get("access_key_id"),
-        cmd.options.get("secret_access_key"),
+        cmd.options.remove("access_key_id"),

Review Comment:
   Added some comments explaining why the keys are removed/plan made mutable 
within datafusion-cli.
   
   I also updated one of the unit tests to invoke FileTypeWriterOptions::build 
to test for this issue in the future.



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

Reply via email to