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

Window functions: reject window frame definition where it is not allowed

Details

    Description

      Discovered this in MDEV-9740:

      The standard, section 6.10, <window function>.
      syntax rules says:

      7) b) The window framing clause of WDX shall not be present.

      Trying

      select rank() over (order by a rows between 1 preceding and 1 following) from ten;
      

      MariaDB: ok (framing ignored)
      PG: Ok (framing ignored)
      Oracle: ORA-00907: missing right parenthesis
      MS SQL: The function 'rank' may not have a window frame.

      I think, it is better to follow the standard and return an error, then to accept the frame definition and then silently ignore it.

      Attachments

        Issue Links

          Activity

            Fixed by:

            commit a197c6bb68d77a0ec73b28d1e6473022ea6b1ae0

            Prohibit using window functions of some types with
            window frames in full accordance with the SQL standard.

            psergei Sergei Petrunia added a comment - Fixed by: commit a197c6bb68d77a0ec73b28d1e6473022ea6b1ae0 Prohibit using window functions of some types with window frames in full accordance with the SQL standard.

            People

              igor Igor Babaev (Inactive)
              psergei Sergei Petrunia
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.