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

add position and occurrence to instr()

    XMLWordPrintableJSON

Details

    Description

      Current instr() only supports two arguments:

      instr(str, substr) - Returns the index of the first occurance of substr in str
      

      Other systems (Vertica, Oracle, Impala etc) support additional position and occurrence arguments:

      instr(str, substr[, pos[, occurrence]])
      

      Oracle doc: https://docs.oracle.com/database/121/SQLRF/functions089.htm#SQLRF00651

      It'd be nice to support this as well. Otherwise, it's a SQL difference between Impala and Hive.
      Impala supports this in IMPALA-3973

      Attachments

        Issue Links

          Activity

            People

              stigahuang Quanlong Huang
              stigahuang Quanlong Huang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 50m
                  1h 50m