Skip to content

[Bug] SHOW TIMESERIES WHERE TAGS(...) CONTAINS is Case-Sensitive While Timeseries CONTAINS is Case-Insensitive #16876

@amanchaudhary-95

Description

@amanchaudhary-95

Search before asking

  • I searched in the issues and found nothing similar.

Version

apache iotdb = 2.0.5

Describe the bug and provide the minimal reproduce step

I'm encountering inconsistent behavior in SQL queries involving CONTAINS filters on timeseries metadata. When searching timeseries by TAGS, the CONTAINS operator behaves case-sensitively.

SHOW TIMESERIES WHERE TAGS(description) CONTAINS "Flow";

This returns results correctly because one of my timeseries has a tag description="Flow".

But if I change the search to:

SHOW TIMESERIES WHERE TAGS(description) CONTAINS "flow";

It returns no results, even though "Flow" exists.
So tag-based CONTAINS filtering is case-sensitive.

What did you expect to see?

CONTAINS should behave consistently across metadata fields, ideally being case-insensitive.
For timeseries names, the same query type is already case-insensitive:

SHOW TIMESERIES WHERE Timeseries CONTAINS "Flow";

This matches "Flow", "flow", "FLOW", etc.

What did you see instead?

Why This Matters:

  • TAG searches are commonly used for metadata filtering and discovery.
  • Case-sensitive matching makes searching inconsistent with other IoTDB metadata filters.
  • It forces users to know exact casing of tags, reducing usability.

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions