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

Vectorization: LIKE should anchor the regexes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2.1, 2.2.0
    • 1.3.0, 2.1.1, 2.2.0
    • UDF, Vectorization
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: