Skip to content

18.5.1 Wrong MV evaluation with SELECT DISTINCT (started in 18.1 and upto 18.6.0) #2795

@den-crane

Description

@den-crane

ClickHouse client version 18.5.1.
Connecting to localhost:9000 as user default.
Connected to ClickHouse server version 18.5.54400.

CREATE TABLE test ( x String) ENGINE = Null;

create MATERIALIZED VIEW test_mv_bad (x String)
ENGINE = MergeTree Partition by tuple() order by tuple()
AS SELECT DISTINCT x FROM test;

create MATERIALIZED VIEW test_mv_good (x String)
ENGINE = MergeTree Partition by tuple() order by tuple()
AS SELECT x FROM test;

insert into test values('stest');

select * from test_mv_bad
Ok.
0 rows in set. Elapsed: 0.007 sec.

select * from test_mv_good
┌─x─────┐
│ stest │
└───────┘
1 rows in set. Elapsed: 0.001 sec.

Metadata

Metadata

Labels

bugConfirmed user-visible misbehaviour in official release

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions