MCPcopy Create free account
hub / github.com/4paradigm/OpenMLDB / SDKCodec

Method SDKCodec

src/codec/sdk_codec.cc:30–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28namespace codec {
29
30SDKCodec::SDKCodec(const ::fedb::nameserver::TableInfo& table_info)
31 : format_version_(table_info.format_version()),
32 base_schema_size_(0),
33 modify_times_(0),
34 version_schema_(),
35 last_ver_(1) {
36 if (table_info.column_desc_size() > 0) {
37 ParseColumnDesc(table_info.column_desc());
38 }
39 if (table_info.column_key_size() > 0) {
40 index_.Clear();
41 index_.CopyFrom(table_info.column_key());
42 }
43 const Schema& add_schema = table_info.added_column_desc();
44 ParseSchemaVer(table_info.schema_versions(), add_schema);
45 ParseAddedColumnDesc(add_schema);
46 ParseTsCol();
47 for (const auto& name : table_info.partition_key()) {
48 auto iter = schema_idx_map_.find(name);
49 if (iter != schema_idx_map_.end()) {
50 partition_col_idx_.push_back(iter->second);
51 }
52 }
53}
54
55SDKCodec::SDKCodec(const ::fedb::api::TableMeta& table_info)
56 : format_version_(table_info.format_version()),

Callers

nothing calls this directly

Calls 1

ClearMethod · 0.45

Tested by

no test coverage detected