Skip to content

SQL: combining = and LIKE does return 0 results on timeseries type #4128

@nebulon42

Description

@nebulon42

Release: 26.4.2

I'm having a timeseries type that has a tag "tags" (not the best design, I know, I'm converting from QuestDB). This "tags" column is CSV. I'm filtering for the "CI" tag. There is no value that is "CI", but there are others like "CI,slow" or "1m,CI,fast" and so on.

Something like

...
WHERE
...
AND (
        "tags" = 'CI'
        OR "tags" LIKE 'CI,%'
        OR "tags" LIKE '%,CI'
        OR "tags" LIKE '%,CI,%'
      )

returns 0 rows

while

...
WHERE
...
AND (
        "tags" LIKE 'CI'
        OR "tags" LIKE 'CI,%'
        OR "tags" LIKE '%,CI'
        OR "tags" LIKE '%,CI,%'
      )

works correctly. It seems that mixing LIKE and = does not work as expected.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Bug.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions