Skip to content

ILike with no wildcards is mistakenly optimized to string equality #15835

@srh

Description

@srh

Describe the bug

col ILIKE 'A' ends up evaluating as false.

Edit: Correction: 'a' ILIKE 'A' seems to get constant-folded, so it wouldn't trigger the bug. col ILIKE 'A' does.

One reproducing query on 46.0.1: SELECT s.col ILIKE 'A' FROM (SELECT 'a' AS col) AS s

PR incoming.

To Reproduce

No response

Expected behavior

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionSomething that used to work no longer does

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions