Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-5978

Add REGEXP_INSTR function (enabled in BigQuery library)

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.36.0
    • None

    Description

      Add support for REGEXP_INSTR function from BigQuery.

      REGEXP_INSTR(string, regexp [, position [, occurrence [, occurrence_position]]])
      Returns the lowest 1-based position of the substring in string that matches the regexp, Returns 0 if there is no match

      • If position is specified, the search starts at this position in string, otherwise it starts at the beginning of string.
      • If occurrence is specified, the search returns index for the specific occurrence of the regexp in value, otherwise returns the first match.
      • If occurrence_position is specified as 1, returns the end index of substring + 1 (default 0 returns start index of match)

      Example:

      SELECT REGEXP_INSTR("abcadcabcaecghi", "adc") as result;

      result
      4

      Attachments

        Issue Links

          Activity

            People

              jerin_john Jerin John
              jerin_john Jerin John
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: