A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/ClickHouse/ClickHouse/issues/24778 below:

Projections inconsistent results for ReplacingMergeTree/CollapsingMergeTree · Issue #24778 · ClickHouse/ClickHouse · GitHub

drop table if exists tp;

create table tp (type Int32, eventcnt UInt64,
projection p (select sum(eventcnt), type group by type)) 
engine = ReplacingMergeTree order by type;

insert into tp select number%3, 1 from numbers(3);
insert into tp select number%3, 2 from numbers(3);

optimize table tp final;

set allow_experimental_projection_optimization = 0, force_optimize_projection = 0;

select sum(eventcnt) eventcnt, type
from tp
group by type
┌─eventcnt─┬─type─┐
│        20 │
│        22 │
│        21 │
└──────────┴──────┘

set allow_experimental_projection_optimization = 1, force_optimize_projection = 1;

select sum(eventcnt) eventcnt, type
from tp
group by type
┌─eventcnt─┬─type─┐
│        30 │
│        32 │
│        31 │
└──────────┴──────┘

ElPeque, markandrus, abionics, orginux, stephen-up and 2 more


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4