diff --git a/cpp/src/common/tablet.cc b/cpp/src/common/tablet.cc index 086717932..2b4fd37e0 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 b1ef896a9..44297b172 100644 --- a/cpp/test/writer/table_view/tsfile_writer_table_test.cc +++ b/cpp/test/writer/table_view/tsfile_writer_table_test.cc @@ -521,7 +521,7 @@ TEST_F(TsFileWriterTableTest, WriteWithNullAndEmptyTag) { for (int i = 0; i < 10; i++) { tablet.add_timestamp(i, static_cast(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);