Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
1.2.5
-
None
-
debian 9
-
2020-3, 2020-4, 2020-5
Description
bug not present in 1.1.7 and definitely present in 1.2.5
order by is not correctly processed for trivial queries
let's say we want to compute sales for region 'x' and 'y', for each of 3 business units 1,2 and 3 like this:
bu | x | y |
---|---|---|
1 | 10 | 12 |
2 | 11 | 11 |
3 | 12 | 10 |
when applying an order by clause, 'order by bu' or 'order by x' work but 'order by y' is ignored
drop table if exists t; |
create table t(a int, b varchar(10), c decimal(7,2)) engine=columnstore; |
insert into t(a,b,c) values |
(1,'x',10),(2,'x',11), (3, 'x', 12), |
(1,'y',12),(2,'y',11), (3, 'y', 10); |
|
-- order by column bu or x work fine
|
select
|
a as bu, |
sum(case when b='x' then c else null end) as 'x', |
sum(case when b='y' then c else null end) as 'y' |
from t |
group by bu |
order by bu /* or order by x */ |
;
|
|
-- order by column y produces a random ordering of rows
|
select
|
a as bu, |
sum(case when b='x' then c else null end) as 'x', |
sum(case when b='y' then c else null end) as 'y' |
from t |
group by bu |
order by y asc |
;
|
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Rank | Ranked higher |
Rank | Ranked higher |
Fix Version/s | 1.2.6 [ 23734 ] |
Status | Open [ 1 ] | Confirmed [ 10101 ] |
Assignee | Roman [ drrtuy ] |
Fix Version/s | 1.4.4 [ 24039 ] |
Assignee | Roman [ drrtuy ] | David Hall [ david.hall ] |
Assignee | David Hall [ david.hall ] | Jose Rojas [ jrojas ] |
Sprint | 2020-3 [ 383 ] |
Status | Confirmed [ 10101 ] | In Progress [ 3 ] |
Assignee | Jose Rojas [ jrojas ] | Roman [ drrtuy ] |
Assignee | Roman [ drrtuy ] | Jose Rojas [ jrojas ] |
Assignee | Jose Rojas [ jrojas ] | Roman [ drrtuy ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Fix Version/s | 1.2.6 [ 23734 ] |
Sprint | 2020-3 [ 383 ] | 2020-3, 2020-4 [ 383, 392 ] |
Rank | Ranked higher |
Team | ColumnStore Team |
Status | In Review [ 10002 ] | In Testing [ 10301 ] |
Assignee | Roman [ drrtuy ] | Daniel Lee [ dleeyh ] |
Sprint | 2020-3, 2020-4 [ 383, 392 ] | 2020-3, 2020-4, 2020-5 [ 383, 392, 396 ] |
Sprint | 2020-3, 2020-4, 2020-5 [ 383, 392, 396 ] | 2020-3, 2020-4 [ 383, 392 ] |
Sprint | 2020-3, 2020-4 [ 383, 392 ] | 2020-3, 2020-4, 2020-5 [ 383, 392, 396 ] |
issue.field.resolutiondate | 2020-03-25 15:26:53.0 | 2020-03-25 15:26:53.202 |
Resolution | Fixed [ 1 ] | |
Status | In Testing [ 10301 ] | Closed [ 6 ] |
Resolution | Fixed [ 1 ] | |
Status | Closed [ 6 ] | Stalled [ 10000 ] |
Status | Stalled [ 10000 ] | Confirmed [ 10101 ] |
Assignee | Daniel Lee [ dleeyh ] | Roman [ drrtuy ] |
Status | Confirmed [ 10101 ] | In Review [ 10002 ] |
Status | In Review [ 10002 ] | In Testing [ 10301 ] |
Assignee | Roman [ drrtuy ] | Daniel Lee [ dleeyh ] |
issue.field.resolutiondate | 2020-03-26 16:25:24.0 | 2020-03-26 16:25:24.603 |
Resolution | Fixed [ 1 ] | |
Status | In Testing [ 10301 ] | Closed [ 6 ] |