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

ANY_VALUE ignores FILTER

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Blocker
    • Resolution: Unresolved
    • N/A
    • 13.2
    • Optimizer
    • None
    • Q4/2026 Server Maintenance, Q4/2026 Server Development

    Description

      MariaDB Version 13.2.0-MariaDB-asan-debug source revision: 82dbd1bba8a326594b27b1f3fc1d3947d7bb458e

      create table t (a int, b int, key(b));
      insert into t values (10,1),(20,1),(30,2),(null,2),(40,2);
      select any_value(a) filter (where a=20) from t;
      select b, any_value(a) filter (where a>15) from t group by b;
      drop table t;
      

      create table t (a int, b int, key(b));
      insert into t values (10,1),(20,1),(30,2),(null,2),(40,2);
      select any_value(a) filter (where a=20) from t;
      any_value(a) filter (where a=20)
      10
      select b, any_value(a) filter (where a>15) from t group by b;
      b	any_value(a) filter (where a>15)
      1	NULL
      2	30
      

      Attachments

        Issue Links

          Activity

            People

              danblack Daniel Black
              alice Alice Sherepa
              Daniel Black Daniel Black
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - 3h 26m
                  3h 26m
                  Remaining:
                  Remaining Estimate - 3h 26m
                  3h 26m
                  Logged:
                  Time Spent - Not Specified
                  Not Specified

                  Git Integration

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