761417898 commented on code in PR #345:
URL: https://github.com/apache/tsfile/pull/345#discussion_r1900356287
##########
cpp/src/common/tablet.h:
##########
@@ -85,17 +88,49 @@ class Tablet {
return MeasurementSchema(name, type);
});
}
+
+ Tablet(const std::string &insert_target_name,
+ const std::vector<std::string> &column_names,
+ const std::vector<common::TSDataType> &data_types,
+ const std::vector<ColumnCategory> &column_categories,
+ int max_rows = DEFAULT_MAX_ROWS, bool has_column_categories = true)
+ : max_row_num_(max_rows),
+ cur_row_size_(0),
+ insert_target_name_(insert_target_name),
+ timestamps_(nullptr),
+ value_matrix_(nullptr),
+ bitmaps_(nullptr),
+ owned_schemas_(false) {
+ schema_vec_ = std::make_shared<std::vector<MeasurementSchema>>();
+ for (size_t i = 0; i < column_names.size(); i++) {
+ schema_vec_->emplace_back(
+ MeasurementSchema(column_names[i], data_types[i],
common::PLAIN,
+ common::UNCOMPRESSED));
+ }
+ if (has_column_categories) {
+ set_column_categories(column_categories);
+ }
+ }
+
~Tablet() { destroy(); }
int init();
void destroy();
size_t get_column_count() const { return schema_vec_->size(); }
+ int get_cur_row_size() const { return cur_row_size_; }
+ void set_row_size(int row_size) { cur_row_size_ = row_size; }
int add_timestamp(uint32_t row_index, int64_t timestamp);
+ // int set_value(int row_index, int schema_index, double val);
Review Comment:
fixed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]