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
|
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Description |
{{monospaced text}}
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 |
{{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}} |
Description |
{{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}} |
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 |
Description |
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 |
When columnstore_select_handler=on this query should return only 2 rows. Instead it returns all rows.
{noformat} 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 {noformat} |
Rank | Ranked higher |
Priority | Major [ 3 ] | Blocker [ 1 ] |
Fix Version/s | 6.1.1 [ 25600 ] |
Assignee | David Hall [ david.hall ] |
Rank | Ranked higher |
Fix Version/s | 6.5.1 [ 25801 ] | |
Fix Version/s | 6.1.1 [ 25600 ] |
Fix Version/s | 6.2.1 [ 26035 ] | |
Fix Version/s | 6.3.1 [ 25801 ] |
Sprint | 2021-9 [ 541 ] |
Assignee | David Hall [ david.hall ] | Gagan Goel [ tntnatbry ] |
Status | Open [ 1 ] | In Review [ 10002 ] |
Sprint | 2021-9 [ 541 ] | 2021-9, 2021-10 [ 541, 549 ] |
Status | In Review [ 10002 ] | In Testing [ 10301 ] |
Assignee | Gagan Goel [ tntnatbry ] | Daniel Lee [ dleeyh ] |
Resolution | Fixed [ 1 ] | |
Status | In Testing [ 10301 ] | Closed [ 6 ] |
Rank | Ranked higher |
Fix Version/s | 6.2.2 [ 27000 ] |
Assignee | Daniel Lee [ dleeyh ] | Richard Stracke [ richard ] |
Assignee | Richard Stracke [ richard ] | Daniel Lee [ dleeyh ] |
Zendesk Related Tickets | 112592 |