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

Provide syntax for unescaped regex on rlike, and other regexp_* functions

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.10.0
    • None
    • UDF
    • All Queries, JDBC and cli

    • regex hive quries

    Description

      To make hive more intuitive, can we provide a syntax for hive functions that when encompassing a regex, that regex doesn't have to the standard hive double escape? For example

      column rlike '
      d

      {1,3}\\.
      d{1,3}

      \\.
      d

      {1,3}\\.
      d{1,3}

      '
      could become
      column rlike '/\d

      {1,3}\.\d{1,3}

      \.\d

      {1,3}\.\d{1,3}

      /'

      In this case, just using PERL's regex brackets, but could be anything...

      The point is to be able to take a standard JAVA/Perl type regex and cut and paste it into a query. This would allow for faster query development, more mainstream adoption by those with regex experience, and intuitive transition to hive query writing.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mandoskippy John Omernik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: