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

Method CombinePartitionKey

src/codec/sdk_codec.cc:283–297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281}
282
283int SDKCodec::CombinePartitionKey(const std::vector<std::string>& raw_data,
284 std::string* key) {
285 if (partition_col_idx_.empty()) {
286 return -1;
287 }
288 key->clear();
289 for (auto idx : partition_col_idx_) {
290 if (idx >= raw_data.size()) {
291 return -1;
292 }
293 if (!key->empty()) key->append("|");
294 key->append(raw_data[idx]);
295 }
296 return 0;
297}
298
299} // namespace codec
300} // namespace fedb

Callers 1

PutSchemaDataFunction · 0.80

Calls 4

clearMethod · 0.80
appendMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected