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

Some of JDBC string functions are not working: LOCATE with 3 params, LTRIM, RTRIM

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.11.0
    • Component/s: None
    • Labels:
      None

      Description

      Below three functions are not working properly:

      {fn LOCATE(string1, string2 [, integer])}
      {fn LTRIM(string)}
      {fn RTRIM(string)}
      

      They're on supported list on SQL reference page, but in SqlOperatorBaseTest.testJdbcFn(), thery're marked as 'not works' with the reason.

      Either moving them to 'Not implemented' on page or fixing them is necessary.

      What would be better?

        Activity

        Hide
        julianhyde Julian Hyde added a comment -

        Resolved in release 1.11.0 (2017-01-11).

        Show
        julianhyde Julian Hyde added a comment - Resolved in release 1.11.0 (2017-01-11).
        Hide
        julianhyde Julian Hyde added a comment -
        Show
        julianhyde Julian Hyde added a comment - Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/c3592044 . Thanks for the PR, Jungtaek Lim !
        Hide
        kabhwan Jungtaek Lim added a comment -

        Julian Hyde
        Thanks for reviewing and fixing up bug, and also cleaning up! I really appreciate it.

        Show
        kabhwan Jungtaek Lim added a comment - Julian Hyde Thanks for reviewing and fixing up bug, and also cleaning up! I really appreciate it.
        Hide
        julianhyde Julian Hyde added a comment -

        Looks good. I fixed up in https://github.com/julianhyde/calcite/commit/f5abe03413cdaa38a6e2d62e1788c7f9b009ab13, changing the FOR keyword to FROM. After 1.10 is released I will squash and merge to master.

        Show
        julianhyde Julian Hyde added a comment - Looks good. I fixed up in https://github.com/julianhyde/calcite/commit/f5abe03413cdaa38a6e2d62e1788c7f9b009ab13 , changing the FOR keyword to FROM. After 1.10 is released I will squash and merge to master.
        Hide
        julianhyde Julian Hyde added a comment -

        Yes, I was going to say the easiest thing is to just fix the code & enable the test. Thanks for the PR - I will review!

        I also noticed that the table http://calcite.apache.org/docs/reference.html#string is not sorted; can you remove the first LOCATE line in reference.md.

        Show
        julianhyde Julian Hyde added a comment - Yes, I was going to say the easiest thing is to just fix the code & enable the test. Thanks for the PR - I will review! I also noticed that the table http://calcite.apache.org/docs/reference.html#string is not sorted; can you remove the first LOCATE line in reference.md.
        Hide
        kabhwan Jungtaek Lim added a comment -

        Never mind. I just fixed all of them. PR is ready to review: https://github.com/apache/calcite/pull/299

        Show
        kabhwan Jungtaek Lim added a comment - Never mind. I just fixed all of them. PR is ready to review: https://github.com/apache/calcite/pull/299

          People

          • Assignee:
            kabhwan Jungtaek Lim
            Reporter:
            kabhwan Jungtaek Lim
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development