Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-2641

Implicit wildcard in LIKE predicate search pattern

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.7.0
    • Fix Version/s: 4.9.0, 4.8.1
    • Labels:
    • Environment:

      Phoenix 4.7.0 on Calcite 1.5.0

      Description

      LIKE predicates have an implicit wildcard at the end of the search pattern

      ie.

      select distinct at1.col2 from at1 group by at1.col2 having at1.col2 like '_'

      will match every cell in col2 whereas it should only match single-character cells.

      This affects both VARCHAR and CHAR.

      Note that selecting by pattern '__' (two single-character wildcards) works properly for VARCHAR but not for CHAR (no result).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kliew Kevin Liew
                Reporter:
                kliew Kevin Liew
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: