Skip to content

Commit

Permalink
correctly set endpoint for gcs
Browse files Browse the repository at this point in the history
  • Loading branch information
samansmink committed Dec 19, 2024
1 parent f945b66 commit a9f1977
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/functions/delta_scan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,13 +278,16 @@ static ffi::EngineBuilder *CreateBuilder(ClientContext &context, const string &p
}
}

if (StringUtil::StartsWith(endpoint, "http://")) {
ffi::set_builder_option(builder, KernelUtils::ToDeltaString("allow_http"),
KernelUtils::ToDeltaString("true"));
}
ffi::set_builder_option(builder, KernelUtils::ToDeltaString("aws_endpoint"),
KernelUtils::ToDeltaString(endpoint));
}
if (StringUtil::StartsWith(endpoint, "http://")) {
ffi::set_builder_option(builder, KernelUtils::ToDeltaString("allow_http"),
KernelUtils::ToDeltaString("true"));
}
ffi::set_builder_option(builder, KernelUtils::ToDeltaString("aws_endpoint"),
KernelUtils::ToDeltaString(endpoint));
} else if (StringUtil::StartsWith(path, "gs://") || StringUtil::StartsWith(path, "gcs://")) {
ffi::set_builder_option(builder, KernelUtils::ToDeltaString("aws_endpoint"),
KernelUtils::ToDeltaString("https://storage.googleapis.com"));
}

ffi::set_builder_option(builder, KernelUtils::ToDeltaString("aws_region"), KernelUtils::ToDeltaString(region));

Expand Down

0 comments on commit a9f1977

Please sign in to comment.