761417898 commented on code in PR #192:
URL: https://github.com/apache/tsfile/pull/192#discussion_r1714845292


##########
cpp/src/writer/tsfile_writer.cc:
##########
@@ -385,6 +510,37 @@ int TsFileWriter::write_column(ChunkWriter *chunk_writer, 
const Tablet &tablet,
     return ret;
 }
 
+int TsFileWriter::value_write_column(ValueChunkWriter *value_chunk_writer,
+                                     const Tablet &tablet, int col_idx) {
+    int ret = E_OK;
+
+    TSDataType data_type = tablet.schema_vec_->at(col_idx).data_type_;
+    int64_t *timestamps = tablet.timestamps_;
+    void *col_values = tablet.value_matrix_[col_idx];
+    BitMap &col_bitmap = tablet.bitmaps_[col_idx];
+    int32_t row_count = tablet.max_rows_;
+
+    if (data_type == common::BOOLEAN) {
+        ret = write_typed_column(value_chunk_writer, timestamps,
+                                 (bool *)col_values, col_bitmap, row_count);
+    } else if (data_type == common::INT32) {
+        ret = write_typed_column(value_chunk_writer, timestamps,
+                                 (int32_t *)col_values, col_bitmap, row_count);
+    } else if (data_type == common::INT64) {
+        ret = write_typed_column(value_chunk_writer, timestamps,
+                                 (int64_t *)col_values, col_bitmap, row_count);
+    } else if (data_type == common::FLOAT) {
+        ret = write_typed_column(value_chunk_writer, timestamps,
+                                 (float *)col_values, col_bitmap, row_count);
+    } else if (data_type == common::DOUBLE) {
+        ret = write_typed_column(value_chunk_writer, timestamps,
+                                 (double *)col_values, col_bitmap, row_count);
+    } else {
+        ASSERT(false);

Review Comment:
   `return E_NOT_SUPPORT;`



-- 
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]

Reply via email to