Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-9724

Window functions: Frame Exclusion support

Details

    Description

      SQL standard supports EXCLUDE clause within window frame definition.

      We currently have it in sql_yacc.yy. The statement is parsed, but ignored:

      opt_window_frame_clause:
                /* empty */ {}
              | window_frame_units window_frame_extent opt_window_frame_exclusion
      

      opt_window_frame_exclusion:
                /* empty */ { $$= Window_frame::EXCL_NONE; }
              | EXCLUDE_SYM CURRENT_SYM ROW_SYM
                { $$= Window_frame::EXCL_CURRENT_ROW; }
              | EXCLUDE_SYM GROUP_SYM
                { $$= Window_frame::EXCL_GROUP; }
              | EXCLUDE_SYM TIES_SYM
                { $$= Window_frame::EXCL_TIES; }
              | EXCLUDE_SYM NO_SYM OTHERS_SYM
                { $$= Window_frame::EXCL_NONE; }
              ;      
      

      The question is - should we implement frame exclusion? It doesn't seem to be supported by anybody:

      If we decide not to support Frame Exclusion, we should disable it in the parser so that it doesn't confuse anybody.

      Attachments

        Issue Links

          Activity

            Pushed to the feature tree.

            psergei Sergei Petrunia added a comment - Pushed to the feature tree.

            Made a decision on the optimizer call: we will not support frame exclusion (at least for the first version).

            The parts of the grammar should remain, but attempt to specify any exclusion clause will cause a "Not supported" or a "not implemented" error (check what error code/message we have)

            psergei Sergei Petrunia added a comment - Made a decision on the optimizer call: we will not support frame exclusion (at least for the first version). The parts of the grammar should remain, but attempt to specify any exclusion clause will cause a "Not supported" or a "not implemented" error (check what error code/message we have)

            People

              psergei Sergei Petrunia
              psergei Sergei Petrunia
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.