Skip to content

Commit

Permalink
[bug](Compile) Add default value for optional field to pass compile's…
Browse files Browse the repository at this point in the history
… missing-field-initializers check (apache#35648)

The former pr apache#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.
  • Loading branch information
ByteYue authored and dataroaring committed May 31, 2024
1 parent ae074bd commit b93a175
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions be/src/io/fs/obj_storage_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -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};
};

Expand Down

0 comments on commit b93a175

Please sign in to comment.