This is an automated email from the ASF dual-hosted git repository.

zhangstar333 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 26ebe0e16b0 [bug](Compile) Add default value for optional field to 
pass compile's missing-field-initializers check (#35648)
26ebe0e16b0 is described below

commit 26ebe0e16b0e08561d844c7c62efc88802d8a40c
Author: AlexYue <[email protected]>
AuthorDate: Thu May 30 16:45:01 2024 +0800

    [bug](Compile) Add default value for optional field to pass compile's 
missing-field-initializers check (#35648)
    
    The former pr #35307 introduces several struct which has fileds with
    type `std::optional`. The perf compile envrionment has enable
    missing-field-initializers check, and these structs is not suitable. So
    this pr tries to fix the compile problem.
---
 be/src/io/fs/obj_storage_client.h | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/be/src/io/fs/obj_storage_client.h 
b/be/src/io/fs/obj_storage_client.h
index 67f9db5583e..40e0ff9a8fe 100644
--- a/be/src/io/fs/obj_storage_client.h
+++ b/be/src/io/fs/obj_storage_client.h
@@ -37,23 +37,23 @@ enum class ObjStorageType : uint8_t {
 };
 
 struct ObjectStoragePathOptions {
-    Path path;
-    std::string bucket;                   // blob container in azure
-    std::string key;                      // blob name
-    std::string prefix;                   // for batch delete and recursive 
delete
-    std::optional<std::string> upload_id; // only used for S3 upload
+    Path path = "";
+    std::string bucket = std::string();                  // blob container in 
azure
+    std::string key = std::string();                     // blob name in azure
+    std::string prefix = std::string();                  // for batch delete 
and recursive delete
+    std::optional<std::string> upload_id = std::nullopt; // only used for S3 
upload
 };
 
 struct ObjectCompleteMultiParts {};
 
 struct ObjectStorageResponse {
-    Status status;
-    std::optional<std::string> upload_id;
-    std::optional<std::string> etag;
+    Status status = Status::OK();
+    std::optional<std::string> upload_id = std::nullopt;
+    std::optional<std::string> etag = std::nullopt;
 };
 
 struct ObjectStorageHeadResponse {
-    Status status;
+    Status status = Status::OK();
     long long file_size {0};
 };
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to