Skip to content

[FEATURE] Support for SUBSTRING_INDEX and FROM in TRIM #574

Closed as not planned

Description

Is your feature request related to a problem?
There is a testcase failure on Tableau's TDVT tests with SPLIT("a-b-c", "-", 2) and SPLIT("a-b-c", "-", -2). OpenSearch fails when running the query

SELECT TRIM(LEADING '-' FROM TRIM(LEADING SUBSTRING_INDEX('a-b-c', '-', (2 - 1)) FROM SUBSTRING_INDEX('a-b-c', '-', 2))) AS `TEMP(Test)(1221977364)(0)`
FROM `calcs`
HAVING (COUNT(1) > 0)

What solution would you like?
I would like successfully run the query above

What alternatives have you considered?
I was unable to find alternative functions for SUBSTRING_INDEX. Recommendations are welcome.

Activity

  1. ghost added
    enhancement
    on Apr 20, 2022
  2. added
    tdvt
    on Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    SQLenhancementtdvt

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions