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

Support for exclamation mark missing in regexp

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2.1
    • 1.3.0, 2.0.0
    • None
    • None

    Description

      with HIVE-6013 gets support for regular expressions. However, die ! character is valid, too. It is needed for expressions like

      set hive.support.quoted.identifiers = none;
      select `^(?!donotuseme).*$` from table;
      

      which is the idiom to select all but column donotuseme .

      See http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html for a reference of supported chars in Java regexp.

      The patch simply fixes the lexer to support '!' as REGEX char. And does simply work.

      Please review.

      If you like to have an iTest for it, I beg you to help me. I tried several days on a different issue to figure out how it is supposed to work and failed miserably.

      Attachments

        1. HIVE-12417.1.patch
          1 kB
          Olaf Flebbe
        2. HIVE-12417.2.patch
          0.9 kB
          Olaf Flebbe

        Activity

          People

            oflebbe Olaf Flebbe
            oflebbe Olaf Flebbe
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: