Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.11.0
    • Fix Version/s: 1.13.0
    • Component/s: core
    • Labels:
      None

      Description

      MEASURES: Defining Calculations for Use in the Query
      The MEASURES clause defines a list of columns for the pattern output table. Each pattern measure column is defined with a column name whose value is specified by a corresponding pattern measure expression.

      A value expression is defined with respect to the pattern variables. Value expression can contain set functions, pattern navigation operations, CLASSIFIER(), MATCH_NUMBER(), and column references to any column of the input table. See "Expressions in MEASURES and DEFINE" for more information.

        Activity

        Hide
        ransom Zhiqiang He added a comment -
        Show
        ransom Zhiqiang He added a comment - https://github.com/apache/calcite/pull/400 please review it .thanks.
        Hide
        julianhyde Julian Hyde added a comment -

        By making SqlParserTest.getTester private you have basically disabled the whole of SqlUnParserTest.

        Show
        julianhyde Julian Hyde added a comment - By making SqlParserTest.getTester private you have basically disabled the whole of SqlUnParserTest.
        Hide
        julianhyde Julian Hyde added a comment -

        I see that in SqlUnParserTest.testMatchRecognizeMeasures3 and SqlUnParserTest.testMatchRecognizeMeasures4 fail if I restore getTester to protected. Adding RUNNING and FINAL to the list inside SqlKind.EXPRESSION seems to help remove some parentheses. But I think you also need to fix the unparse for FIRST and LAST, maybe RUNNING and FINAL too.

        Can you do this on top of my https://github.com/julianhyde/calcite/tree/1642-measures branch, which contains your change rebased to latest master.

        Show
        julianhyde Julian Hyde added a comment - I see that in SqlUnParserTest.testMatchRecognizeMeasures3 and SqlUnParserTest.testMatchRecognizeMeasures4 fail if I restore getTester to protected. Adding RUNNING and FINAL to the list inside SqlKind.EXPRESSION seems to help remove some parentheses. But I think you also need to fix the unparse for FIRST and LAST, maybe RUNNING and FINAL too. Can you do this on top of my https://github.com/julianhyde/calcite/tree/1642-measures branch, which contains your change rebased to latest master.
        Hide
        ransom Zhiqiang He added a comment -

        Julian Hyde
        I create a MR in your project:
        https://github.com/julianhyde/calcite/pull/10
        please review it. thanks.

        Show
        ransom Zhiqiang He added a comment - Julian Hyde I create a MR in your project: https://github.com/julianhyde/calcite/pull/10 please review it. thanks.
        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/4d20d62d . Thanks for the PR, Zhiqiang He !
        Hide
        jcamachorodriguez Jesus Camacho Rodriguez added a comment -

        Resolved in release 1.13.0 (2017-06-26).

        Show
        jcamachorodriguez Jesus Camacho Rodriguez added a comment - Resolved in release 1.13.0 (2017-06-26).

          People

          • Assignee:
            ransom Zhiqiang He
            Reporter:
            ransom Zhiqiang He
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development