Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GLUTEN-1632][CH]Daily Update Clickhouse Version (20231206) #3938

Merged
merged 2 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cpp-ch/clickhouse.version
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
CH_ORG=Kyligence
CH_BRANCH=rebase_ch/20231201
CH_COMMIT=5c8237dd030
CH_BRANCH=rebase_ch/20231206
CH_COMMIT=5a611598662
39 changes: 27 additions & 12 deletions cpp-ch/local-engine/Storages/SubstraitSource/ReadBufferBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -583,21 +583,26 @@ class S3FileReadBufferBuilder : public ReadBufferBuilder
settings.tryGetString(BackendInitializerUtil::HADOOP_S3_SECRET_KEY, sk);
stripQuote(ak);
stripQuote(sk);
const DB::Settings & global_settings = context->getGlobalContext()->getSettingsRef();
const DB::Settings & local_settings = context->getSettingsRef();
if (use_assumed_role)
{
auto new_client = DB::S3::ClientFactory::instance().create(
client_configuration,
false,
ak,
sk,
"",
{},
{},
{.use_environment_credentials = true,
.use_insecure_imds_request = false,
.role_arn = getSetting(settings, bucket_name, BackendInitializerUtil::HADOOP_S3_ASSUMED_ROLE),
.session_name = getSetting(settings, bucket_name, BackendInitializerUtil::HADOOP_S3_ASSUMED_SESSION_NAME),
.external_id = getSetting(settings, bucket_name, BackendInitializerUtil::HADOOP_S3_ASSUMED_EXTERNAL_ID)});
local_settings.s3_disable_checksum,
false, // is_virtual_hosted_style
ak, // access_key_id
sk, // secret_access_key
"", // server_side_encryption_customer_key_base64
{}, // sse_kms_config
{}, // headers
DB::S3::CredentialsConfiguration{
.use_environment_credentials = true,
.use_insecure_imds_request = false,
.role_arn = getSetting(settings, bucket_name, BackendInitializerUtil::HADOOP_S3_ASSUMED_ROLE),
.session_name = getSetting(settings, bucket_name, BackendInitializerUtil::HADOOP_S3_ASSUMED_SESSION_NAME),
.external_id = getSetting(settings, bucket_name, BackendInitializerUtil::HADOOP_S3_ASSUMED_EXTERNAL_ID)
});

//TODO: support online change config for cached per_bucket_clients
std::shared_ptr<DB::S3::Client> ret = std::move(new_client);
Expand All @@ -607,7 +612,17 @@ class S3FileReadBufferBuilder : public ReadBufferBuilder
else
{
auto new_client = DB::S3::ClientFactory::instance().create(
client_configuration, false, ak, sk, "", {}, {}, {.use_environment_credentials = true, .use_insecure_imds_request = false});
client_configuration,
local_settings.s3_disable_checksum,
false, // is_virtual_hosted_style
ak, // access_key_id
sk, // secret_access_key
"", // server_side_encryption_customer_key_base64
{}, // sse_kms_config
{}, // headers
DB::S3::CredentialsConfiguration{
.use_environment_credentials = true,
.use_insecure_imds_request = false});

std::shared_ptr<DB::S3::Client> ret = std::move(new_client);
cacheClient(bucket_name, is_per_bucket, ret);
Expand Down
Loading