Jimexist commented on code in PR #3540:
URL: https://github.com/apache/arrow-datafusion/pull/3540#discussion_r974898674
##########
datafusion-cli/src/main.rs:
##########
@@ -120,6 +141,32 @@ pub async fn main() -> Result<()> {
files
}
};
+
+ if let (Some(object_store_option), Some(bucket_name)) =
+ (args.object_store_option, args.bucket_name)
+ {
+ match object_store_option {
+ ObjectStoreRegistrationOptions::S3 => {
+ let s3_object_store =
build_s3_object_store_from_env(&bucket_name)?;
+
+ ctx.runtime_env().register_object_store(
+ "s3",
+ &bucket_name,
+ Arc::new(s3_object_store),
+ );
+ }
+ ObjectStoreRegistrationOptions::GCS => {
+ let gcs_object_store =
build_gcs_object_store_from_env(&bucket_name)?;
+
+ ctx.runtime_env().register_object_store(
+ "gcs",
+ &bucket_name,
+ Arc::new(gcs_object_store),
+ );
+ }
+ }
+ }
Review Comment:
should abort with error if only one of two is supplied
--
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]