Uploaded image for project: 'Apache AsterixDB'
  1. Apache AsterixDB
  2. ASTERIXDB-2651

Handle matching a literal backslash properly in LIKE

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.4
    • Fix Version/s: 0.9.5
    • Component/s: FUN - Functions
    • Labels:
      None

      Description

      Fix matching a literal backslash in LIKE. As an example,
       

      SELECT "test\\string" LIKE "%\\\\%"
      

      Also, fix the issue with a dynamic and changing pattern in regexp_*() functions (and functions using regex matcher class). Here is an example, for a dataset with the below tuples

      { "id": 1, "test_str": "hello world", "pattern": "h"}
      { "id": 2, "test_str": "hello world", "pattern": "H"}
      
      FROM ds SELECT regexp_contains(test_str, pattern, "i"); -- "i" flag means case insenstive

        Attachments

          Activity

            People

            • Assignee:
              alsuliman Ali Alsuliman
              Reporter:
              alsuliman Ali Alsuliman
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: