mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
Fix: DISTINCT in order with zero values in non-sorted columns
This commit is contained in:
parent
df8c930be3
commit
68fcc39292
@ -88,6 +88,9 @@ public:
|
||||
{
|
||||
++this->version;
|
||||
this->m_size = 0;
|
||||
|
||||
/// clear ZeroValueStorage
|
||||
this->clearHasZero();
|
||||
}
|
||||
};
|
||||
|
||||
@ -108,6 +111,9 @@ public:
|
||||
{
|
||||
++this->version;
|
||||
this->m_size = 0;
|
||||
|
||||
/// clear ZeroValueStorage
|
||||
this->clearHasZero();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -0,0 +1,2 @@
|
||||
1
|
||||
2
|
@ -0,0 +1,15 @@
|
||||
set optimize_distinct_in_order=1;
|
||||
|
||||
DROP TABLE IF EXISTS test;
|
||||
|
||||
CREATE TABLE test
|
||||
(
|
||||
`c1` String,
|
||||
`c2` String
|
||||
)
|
||||
ENGINE = MergeTree
|
||||
ORDER BY c1;
|
||||
|
||||
INSERT INTO test(c1, c2) VALUES ('1', ''), ('2', '');
|
||||
|
||||
SELECT DISTINCT c2, c1 FROM test FORMAT TSV;
|
Loading…
Reference in New Issue
Block a user