@@ -49,7 +49,7 @@ namespace S3AuthSetting
4949
5050namespace S3RequestSetting
5151{
52- extern const S3RequestSettingsBoolAuto allow_native_copy;
52+ extern const S3RequestSettingsBool allow_native_copy;
5353 extern const S3RequestSettingsString storage_class_name;
5454 extern const S3RequestSettingsUInt64 http_max_fields;
5555 extern const S3RequestSettingsUInt64 http_max_field_name_size;
@@ -148,7 +148,7 @@ BackupReaderS3::BackupReaderS3(
148148 const S3::URI & s3_uri_,
149149 const String & access_key_id_,
150150 const String & secret_access_key_,
151- std::optional< bool > allow_s3_native_copy,
151+ bool allow_s3_native_copy,
152152 const ReadSettings & read_settings_,
153153 const WriteSettings & write_settings_,
154154 const ContextPtr & context_,
@@ -166,9 +166,7 @@ BackupReaderS3::BackupReaderS3(
166166 }
167167
168168 s3_settings.request_settings .updateFromSettings (context_->getSettingsRef (), /* if_changed */ true );
169-
170- if (allow_s3_native_copy)
171- s3_settings.request_settings [S3RequestSetting::allow_native_copy] = *allow_s3_native_copy;
169+ s3_settings.request_settings [S3RequestSetting::allow_native_copy] = allow_s3_native_copy;
172170
173171 client = makeS3Client (s3_uri_, access_key_id_, secret_access_key_, s3_settings, context_);
174172
@@ -247,7 +245,7 @@ BackupWriterS3::BackupWriterS3(
247245 const S3::URI & s3_uri_,
248246 const String & access_key_id_,
249247 const String & secret_access_key_,
250- std::optional< bool > allow_s3_native_copy,
248+ bool allow_s3_native_copy,
251249 const String & storage_class_name,
252250 const ReadSettings & read_settings_,
253251 const WriteSettings & write_settings_,
@@ -267,10 +265,7 @@ BackupWriterS3::BackupWriterS3(
267265 }
268266
269267 s3_settings.request_settings .updateFromSettings (context_->getSettingsRef (), /* if_changed */ true );
270-
271- if (allow_s3_native_copy)
272- s3_settings.request_settings [S3RequestSetting::allow_native_copy] = *allow_s3_native_copy;
273-
268+ s3_settings.request_settings [S3RequestSetting::allow_native_copy] = allow_s3_native_copy;
274269 s3_settings.request_settings [S3RequestSetting::storage_class_name] = storage_class_name;
275270
276271 client = makeS3Client (s3_uri_, access_key_id_, secret_access_key_, s3_settings, context_);
0 commit comments