Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-14349

Vectorization: LIKE should anchor the regexes

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.1, 2.2.0
    • Fix Version/s: 1.3.0, 2.1.1, 2.2.0
    • Component/s: UDF, Vectorization
    • Labels:
      None
    • Release Note:
      Vectorization: LIKE should anchor the regexes

      Description

      RLIKE works like contains() and LIKE works like matches().

      The UDFLike LIKE -> Regex conversion returns unanchored regexes making the vectorized LIKE behave like RLIKE.

      create temporary table x (a string) stored as orc;
      insert into x values('XYZa'), ('badXYZa');
      
      select * from x where a LIKE 'XYZ%a%' order by 1;
      OK
      XYZa
      badXYZa
      Time taken: 4.029 seconds, Fetched: 2 row(s)
      

        Attachments

        1. HIVE-14349.1.patch
          4 kB
          Gopal Vijayaraghavan

          Issue Links

            Activity

              People

              • Assignee:
                gopalv Gopal Vijayaraghavan
                Reporter:
                gopalv Gopal Vijayaraghavan
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: