From 66a1ff5cc732809dfe09b4bc1335d7d1ff9bc88a Mon Sep 17 00:00:00 2001 From: Dipeshsharma2005 Date: Tue, 6 Jan 2026 14:42:34 +0530 Subject: [PATCH] Fix case-sensitive CONTAINS for tag filtering Normalize tag values during CONTAINS evaluation so that tag-based filtering behaves case-insensitively, consistent with timeseries name filtering. --- .../iotdb/db/schemaengine/schemaregion/tag/TagManager.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/tag/TagManager.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/tag/TagManager.java index 86e2a6563143..f3c685b846bf 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/tag/TagManager.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/tag/TagManager.java @@ -58,6 +58,8 @@ import java.util.NoSuchElementException; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; +import java.util.Locale; + import static java.util.stream.Collectors.toList; @@ -242,9 +244,12 @@ private List> getMatchedTimeseriesInIndex(TagFilter tagFilt continue; } String tagValue = entry.getKey(); - if (tagValue.contains(tagFilter.getValue())) { + if (tagValue + .toLowerCase(Locale.ROOT) + .contains(tagFilter.getValue().toLowerCase(Locale.ROOT))) { allMatchedNodes.addAll(entry.getValue()); } + } } else { for (Map.Entry>> entry : value2Node.entrySet()) {