| 281 | } |
| 282 | |
| 283 | int 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 |
no test coverage detected