Skip to content

Commit

Permalink
refactor: remove more unused files
Browse files Browse the repository at this point in the history
  • Loading branch information
timvw committed Mar 30, 2024
1 parent 3af709b commit 847f439
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 160 deletions.
11 changes: 8 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ async fn main() -> Result<()> {
.map_err(|e| DataFusionError::Execution(format!("Failed to parse url, {e}")))?;
let gcs = build_gcs(&gcs_url).await?;
let gcs_arc = Arc::new(gcs);
ctx.runtime_env().register_object_store(&gcs_url, gcs_arc.clone());
ctx.runtime_env()
.register_object_store(&gcs_url, gcs_arc.clone());

deltalake::gcp::register_handlers(None);

Expand Down Expand Up @@ -405,8 +406,12 @@ async fn build_s3(url: &Url, sdk_config: &SdkConfig) -> Result<AmazonS3> {
}

async fn build_gcs(gcs_url: &Url) -> Result<GoogleCloudStorage> {
let google_application_credentials = env::var("GOOGLE_APPLICATION_CREDENTIALS")
.map_err(|_| DataFusionError::Execution("Could not find GOOGLE_APPLICATION_CREDENTIALS environment variable"))?;
let google_application_credentials =
env::var("GOOGLE_APPLICATION_CREDENTIALS").map_err(|_| {
DataFusionError::Execution(
"Could not find GOOGLE_APPLICATION_CREDENTIALS environment variable",

Check failure on line 412 in src/main.rs

View workflow job for this annotation

GitHub Actions / cargo clippy

mismatched types
)
})?;

let bucket_name = gcs_url.host_str().unwrap();

Expand Down
157 changes: 0 additions & 157 deletions src/object_store_util.rs

This file was deleted.

0 comments on commit 847f439

Please sign in to comment.