Details
-
Bug
-
Status: Closed (View Workflow)
-
Blocker
-
Resolution: Fixed
-
5.5.1
-
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
|