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

Add support for translate (expession, from_string, to_string)

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.0
    • Fix Version/s: 1.8.0
    • Component/s: None
    • Labels:
      None

      Description

      Calcite follows the standard SQL reference.
      SQL reference, ISO/IEC 9075-2:2011(E), section 6.30

      <character transliteration> ::=
      TRANSLATE <left paren> <character value expression>
      USING <transliteration name> <right paren>

      Need to add support for translate (expession, from_string, to_string) alternative syntax.
      Ex: Add the Oracle-style TRANSLATE function to SqlStdOperatorTable
      (call it say TRANSLATE3, since it has 3 parameters)

        Activity

        Hide
        julianhyde Julian Hyde added a comment -

        Resolved in release 1.8.0 (2016-06-13).

        Show
        julianhyde Julian Hyde added a comment - Resolved in release 1.8.0 (2016-06-13).
        Hide
        julianhyde Julian Hyde added a comment -

        I reviewed the PR and it looks good – thanks! Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/4e33eedc.

        I made a couple of changes in http://git-wip-us.apache.org/repos/asf/calcite/commit/1be4056b. I moved the function to OracleSqlOperatorTable, since it is not a standard SQL function. (It is in Oracle and PostgreSQL but not in MySQL, for instance.) I also added more validator tests, and changed the parser a bit.

        Show
        julianhyde Julian Hyde added a comment - I reviewed the PR and it looks good – thanks! Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/4e33eedc . I made a couple of changes in http://git-wip-us.apache.org/repos/asf/calcite/commit/1be4056b . I moved the function to OracleSqlOperatorTable, since it is not a standard SQL function. (It is in Oracle and PostgreSQL but not in MySQL, for instance.) I also added more validator tests, and changed the parser a bit.
        Hide
        javanlion Javanshir Yelchiyev added a comment -

        I have submitted pull request for this Jira - https://github.com/apache/calcite/pull/225

        Show
        javanlion Javanshir Yelchiyev added a comment - I have submitted pull request for this Jira - https://github.com/apache/calcite/pull/225

          People

          • Assignee:
            julianhyde Julian Hyde
            Reporter:
            arina Arina Ielchiieva
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development