@@ -50,7 +50,7 @@ namespace S3AuthSetting
5050
5151namespace S3RequestSetting
5252{
53- extern const S3RequestSettingsBoolAuto allow_native_copy;
53+ extern const S3RequestSettingsBool allow_native_copy;
5454 extern const S3RequestSettingsString storage_class_name;
5555 extern const S3RequestSettingsUInt64 http_max_fields;
5656 extern const S3RequestSettingsUInt64 http_max_field_name_size;
@@ -150,7 +150,7 @@ BackupReaderS3::BackupReaderS3(
150150 const S3::URI & s3_uri_,
151151 const String & access_key_id_,
152152 const String & secret_access_key_,
153- std::optional< bool > allow_s3_native_copy,
153+ bool allow_s3_native_copy,
154154 const ReadSettings & read_settings_,
155155 const WriteSettings & write_settings_,
156156 const ContextPtr & context_,
@@ -168,9 +168,7 @@ BackupReaderS3::BackupReaderS3(
168168 }
169169
170170 s3_settings.request_settings .updateFromSettings (context_->getSettingsRef (), /* if_changed */ true );
171-
172- if (allow_s3_native_copy)
173- s3_settings.request_settings [S3RequestSetting::allow_native_copy] = *allow_s3_native_copy;
171+ s3_settings.request_settings [S3RequestSetting::allow_native_copy] = allow_s3_native_copy;
174172
175173 client = makeS3Client (s3_uri_, access_key_id_, secret_access_key_, s3_settings, context_);
176174
@@ -249,7 +247,7 @@ BackupWriterS3::BackupWriterS3(
249247 const S3::URI & s3_uri_,
250248 const String & access_key_id_,
251249 const String & secret_access_key_,
252- std::optional< bool > allow_s3_native_copy,
250+ bool allow_s3_native_copy,
253251 const String & storage_class_name,
254252 const ReadSettings & read_settings_,
255253 const WriteSettings & write_settings_,
@@ -269,10 +267,7 @@ BackupWriterS3::BackupWriterS3(
269267 }
270268
271269 s3_settings.request_settings .updateFromSettings (context_->getSettingsRef (), /* if_changed */ true );
272-
273- if (allow_s3_native_copy)
274- s3_settings.request_settings [S3RequestSetting::allow_native_copy] = *allow_s3_native_copy;
275-
270+ s3_settings.request_settings [S3RequestSetting::allow_native_copy] = allow_s3_native_copy;
276271 s3_settings.request_settings [S3RequestSetting::storage_class_name] = storage_class_name;
277272
278273 client = makeS3Client (s3_uri_, access_key_id_, secret_access_key_, s3_settings, context_);
0 commit comments