@@ -76,12 +76,15 @@ class ConfigParser {
7676
7777 // Parse list configurations
7878 template <typename T>
79- Status ParseList (const std::string& key, const std::string& delimiter,
80- std::vector<T>* list ) const {
79+ Status ParseList (const std::string& key, const std::string& delimiter, std::vector<T>* list,
80+ bool need_trim = false ) const {
8181 auto iter = config_map_.find (key);
8282 if (iter != config_map_.end ()) {
8383 auto value_str_vec = StringUtils::Split (iter->second , delimiter, /* ignore_empty=*/ true );
84- for (const auto & value_str : value_str_vec) {
84+ for (auto & value_str : value_str_vec) {
85+ if (need_trim) {
86+ StringUtils::Trim (&value_str);
87+ }
8588 if constexpr (std::is_same_v<T, std::string>) {
8689 list->emplace_back (value_str);
8790 } else {
@@ -375,6 +378,9 @@ struct CoreOptions::Impl {
375378 std::vector<std::string> sequence_field;
376379 std::vector<std::string> remove_record_on_sequence_group;
377380 std::vector<std::string> blob_fields;
381+ std::vector<std::string> blob_descriptor_fields;
382+ std::vector<std::string> blob_view_fields;
383+ std::vector<std::string> blob_external_storage_fields;
378384
379385 std::string partition_default_name = " __DEFAULT_PARTITION__" ;
380386 StartupMode startup_mode = StartupMode::Default();
@@ -387,6 +393,7 @@ struct CoreOptions::Impl {
387393 std::optional<std::string> field_default_func;
388394 std::optional<std::string> scan_fallback_branch;
389395 std::optional<std::string> data_file_external_paths;
396+ std::optional<std::string> blob_external_storage_path;
390397
391398 std::map<std::string, std::string> raw_options;
392399
@@ -537,7 +544,27 @@ struct CoreOptions::Impl {
537544 PAIMON_RETURN_NOT_OK (parser.ParseBucketFunctionType (&bucket_function_type));
538545 // Parse blob-field - column names to store as blob type, comma separated
539546 PAIMON_RETURN_NOT_OK (parser.ParseList <std::string>(
540- Options::BLOB_FIELD , Options::FIELDS_SEPARATOR , &blob_fields));
547+ Options::BLOB_FIELD , Options::FIELDS_SEPARATOR , &blob_fields, /* need_trim=*/ true ));
548+ // Parse blob-descriptor-field - BLOB fields stored inline as serialized descriptors
549+ PAIMON_RETURN_NOT_OK (
550+ parser.ParseList <std::string>(Options::BLOB_DESCRIPTOR_FIELD , Options::FIELDS_SEPARATOR ,
551+ &blob_descriptor_fields, /* need_trim=*/ true ));
552+ if (blob_descriptor_fields.empty ()) {
553+ PAIMON_RETURN_NOT_OK (parser.ParseList <std::string>(
554+ Options::FALLBACK_BLOB_DESCRIPTOR_FIELD , Options::FIELDS_SEPARATOR ,
555+ &blob_descriptor_fields, /* need_trim=*/ true ));
556+ }
557+ // Parse blob-view-field - BLOB fields stored inline as serialized view metadata
558+ PAIMON_RETURN_NOT_OK (parser.ParseList <std::string>(Options::BLOB_VIEW_FIELD ,
559+ Options::FIELDS_SEPARATOR ,
560+ &blob_view_fields, /* need_trim=*/ true ));
561+ // Parse blob-external-storage-field - descriptor BLOB fields written to external storage
562+ PAIMON_RETURN_NOT_OK (parser.ParseList <std::string>(
563+ Options::BLOB_EXTERNAL_STORAGE_FIELD , Options::FIELDS_SEPARATOR ,
564+ &blob_external_storage_fields, /* need_trim=*/ true ));
565+ // Parse blob-external-storage-path - external storage path for configured BLOB fields
566+ PAIMON_RETURN_NOT_OK (
567+ parser.Parse (Options::BLOB_EXTERNAL_STORAGE_PATH , &blob_external_storage_path));
541568 return Status::OK ();
542569 }
543570
@@ -1389,6 +1416,29 @@ const std::vector<std::string>& CoreOptions::GetBlobFields() const {
13891416 return impl_->blob_fields ;
13901417}
13911418
1419+ const std::vector<std::string>& CoreOptions::GetBlobDescriptorFields () const {
1420+ return impl_->blob_descriptor_fields ;
1421+ }
1422+
1423+ const std::vector<std::string>& CoreOptions::GetBlobViewFields () const {
1424+ return impl_->blob_view_fields ;
1425+ }
1426+
1427+ std::vector<std::string> CoreOptions::GetBlobInlineFields () const {
1428+ std::vector<std::string> blob_inline_fields = impl_->blob_descriptor_fields ;
1429+ blob_inline_fields.insert (blob_inline_fields.end (), impl_->blob_view_fields .begin (),
1430+ impl_->blob_view_fields .end ());
1431+ return blob_inline_fields;
1432+ }
1433+
1434+ const std::vector<std::string>& CoreOptions::GetBlobExternalStorageFields () const {
1435+ return impl_->blob_external_storage_fields ;
1436+ }
1437+
1438+ std::optional<std::string> CoreOptions::GetBlobExternalStoragePath () const {
1439+ return impl_->blob_external_storage_path ;
1440+ }
1441+
13921442int64_t CoreOptions::GetLookupCacheFileRetentionMs () const {
13931443 return impl_->lookup_cache_file_retention_ms ;
13941444}
0 commit comments