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

wrong result with window function inside a subquery

    XMLWordPrintable

Details

    Description

      CREATE TABLE t(i INT);
      INSERT INTO t VALUES (1), (2);
      SELECT (SELECT SUM(i) OVER (partition BY i)) FROM t;
      

      10.2 26432e49d37a37

      MariaDB [test]> SELECT (SELECT SUM(i) OVER (partition BY i)) FROM t;
      +---------------------------------------+
      | (SELECT SUM(i) OVER (partition BY i)) |
      +---------------------------------------+
      | NULL                                  |
      | NULL                                  |
      +---------------------------------------+
      2 rows in set (0.00 sec)
      

      Expected result:

      {1,2}

      Attachments

        Activity

          People

            psergei Sergei Petrunia
            alice Alice Sherepa
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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