This is an automated email from the ASF dual-hosted git repository.

hongzhigao pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/tsfile.git


The following commit(s) were added to refs/heads/develop by this push:
     new ed5b5dc3 The column names in the addValue interface are 
case-insensitive (#526)
ed5b5dc3 is described below

commit ed5b5dc36015f2c619db23a61f9fddd591d0cc0f
Author: Hongzhi Gao <[email protected]>
AuthorDate: Fri Jun 27 17:16:31 2025 +0800

    The column names in the addValue interface are case-insensitive (#526)
---
 cpp/src/common/tablet.cc                               | 2 +-
 cpp/test/writer/table_view/tsfile_writer_table_test.cc | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cpp/src/common/tablet.cc b/cpp/src/common/tablet.cc
index 08671793..2b4fd37e 100644
--- a/cpp/src/common/tablet.cc
+++ b/cpp/src/common/tablet.cc
@@ -280,7 +280,7 @@ int Tablet::add_value(uint32_t row_index, const std::string 
&measurement_name,
     if (err_code_ != E_OK) {
         return err_code_;
     }
-    SchemaMapIterator find_iter = schema_map_.find(measurement_name);
+    SchemaMapIterator find_iter = schema_map_.find(to_lower(measurement_name));
     if (LIKELY(find_iter == schema_map_.end())) {
         ret = E_INVALID_ARG;
     } else {
diff --git a/cpp/test/writer/table_view/tsfile_writer_table_test.cc 
b/cpp/test/writer/table_view/tsfile_writer_table_test.cc
index d2f6c1c2..4b353ca2 100644
--- a/cpp/test/writer/table_view/tsfile_writer_table_test.cc
+++ b/cpp/test/writer/table_view/tsfile_writer_table_test.cc
@@ -522,7 +522,7 @@ TEST_F(TsFileWriterTableTest, WriteWithNullAndEmptyTag) {
 
     for (int i = 0; i < 10; i++) {
         tablet.add_timestamp(i, static_cast<int64_t>(time++));
-        tablet.add_value(i, 0, "tag1");
+        tablet.add_value(i, "ID0", "tag1");
         tablet.add_value(i, 1, "tag2");
         tablet.add_value(i, 2, "tag3");
         tablet.add_value(i, 3, 100.0f);

Reply via email to