Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-4719

ColumnStore ignores where clause: inline view with a window function

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Fixed
    • 5.5.1
    • 6.2.1, 6.2.2
    • None
    • None
    • 10.5.9-6-MariaDB-enterprise-log
      Columnstore 5.5
    • 2021-9, 2021-10

    Description

      When columnstore_select_handler=on this query should return only 2 rows. Instead it returns all rows.

      create database test1;
      use test1;
       
      CREATE TABLE test_table (
      category CHAR(1),
      count INTEGER(1)
      ) ENGINE=COLUMNSTORE;
       
      INSERT INTO test_table (category, count) VALUES ('A', 1);
      INSERT INTO test_table (category, count) VALUES ('A', 2);
      INSERT INTO test_table (category, count) VALUES ('B', 3);
      INSERT INTO test_table (category, count) VALUES ('B', 4);
       
      set columnstore_select_handler=off;
      select * FROM (
      SELECT count / SUM(count) OVER (PARTITION BY category) AS ratio
      FROM test_table
      ) a
      where ratio > .5;
      ratio
      0.6667
      0.5714
       
      set columnstore_select_handler=on;
      select * FROM (
      SELECT count / SUM(count) OVER (PARTITION BY category) AS ratio
      FROM test_table
      ) a
      where ratio > .5;
      ratio
      0.6667
      0.3333
      0.5714
      0.4286
      

      Attachments

        Activity

          People

            dleeyh Daniel Lee (Inactive)
            edward Edward Stoever
            Votes:
            1 Vote for this issue
            Watchers:
            5 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.