@@ -376,6 +376,7 @@ struct TableDescriptor {
376376 int32_t bucket_count{0 };
377377 std::vector<std::string> bucket_keys;
378378 std::unordered_map<std::string, std::string> properties;
379+ std::unordered_map<std::string, std::string> custom_properties;
379380 std::string comment;
380381
381382 class Builder {
@@ -405,6 +406,21 @@ struct TableDescriptor {
405406 return *this ;
406407 }
407408
409+ Builder& SetCustomProperty (std::string key, std::string value) {
410+ custom_properties_[std::move (key)] = std::move (value);
411+ return *this ;
412+ }
413+
414+ Builder& SetLogFormat (std::string format) {
415+ properties_[" table.log.format" ] = std::move (format);
416+ return *this ;
417+ }
418+
419+ Builder& SetKvFormat (std::string format) {
420+ properties_[" table.kv.format" ] = std::move (format);
421+ return *this ;
422+ }
423+
408424 Builder& SetComment (std::string comment) {
409425 comment_ = std::move (comment);
410426 return *this ;
@@ -413,7 +429,8 @@ struct TableDescriptor {
413429 TableDescriptor Build () {
414430 return TableDescriptor{std::move (schema_), std::move (partition_keys_),
415431 bucket_count_, std::move (bucket_keys_),
416- std::move (properties_), std::move (comment_)};
432+ std::move (properties_), std::move (custom_properties_),
433+ std::move (comment_)};
417434 }
418435
419436 private:
@@ -422,6 +439,7 @@ struct TableDescriptor {
422439 int32_t bucket_count_{0 };
423440 std::vector<std::string> bucket_keys_;
424441 std::unordered_map<std::string, std::string> properties_;
442+ std::unordered_map<std::string, std::string> custom_properties_;
425443 std::string comment_;
426444 };
427445
0 commit comments