mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Fix bug of check table when creating data part with wide format and projection (#33774)
This commit is contained in:
parent
adbdc3153a
commit
9f6f84259d
@ -153,7 +153,7 @@ IMergeTreeDataPart::Checksums checkDataPart(
|
|||||||
[&](const ISerialization::SubstreamPath & substream_path)
|
[&](const ISerialization::SubstreamPath & substream_path)
|
||||||
{
|
{
|
||||||
String projection_file_name = ISerialization::getFileNameForStream(projection_column, substream_path) + ".bin";
|
String projection_file_name = ISerialization::getFileNameForStream(projection_column, substream_path) + ".bin";
|
||||||
checksums_data.files[projection_file_name] = checksum_compressed_file(disk, projection_path + projection_file_name);
|
projection_checksums_data.files[projection_file_name] = checksum_compressed_file(disk, projection_path + projection_file_name);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -270,7 +270,6 @@ IMergeTreeDataPart::Checksums checkDataPart(
|
|||||||
|
|
||||||
if (require_checksums || !checksums_txt.files.empty())
|
if (require_checksums || !checksums_txt.files.empty())
|
||||||
checksums_txt.checkEqual(checksums_data, check_uncompressed);
|
checksums_txt.checkEqual(checksums_data, check_uncompressed);
|
||||||
|
|
||||||
return checksums_data;
|
return checksums_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
all_1_1_0 1
|
all_1_1_0 1
|
||||||
all_2_2_0 1
|
all_2_2_0 1
|
||||||
|
201805_1_1_0 1
|
||||||
|
@ -8,3 +8,11 @@ insert into tp select number, number from numbers(5);
|
|||||||
check table tp settings check_query_single_value_result=0;
|
check table tp settings check_query_single_value_result=0;
|
||||||
|
|
||||||
drop table if exists tp;
|
drop table if exists tp;
|
||||||
|
|
||||||
|
CREATE TABLE tp (`p` Date, `k` UInt64, `v1` UInt64, `v2` Int64, PROJECTION p1 ( SELECT p, sum(k), sum(v1), sum(v2) GROUP BY p) ) ENGINE = MergeTree PARTITION BY toYYYYMM(p) ORDER BY k SETTINGS min_bytes_for_wide_part = 0;
|
||||||
|
|
||||||
|
INSERT INTO tp (p, k, v1, v2) VALUES ('2018-05-15', 1, 1000, 2000), ('2018-05-16', 2, 3000, 4000), ('2018-05-17', 3, 5000, 6000), ('2018-05-18', 4, 7000, 8000);
|
||||||
|
|
||||||
|
CHECK TABLE tp settings check_query_single_value_result=0;
|
||||||
|
|
||||||
|
DROP TABLE if exists tp;
|
||||||
|
Loading…
Reference in New Issue
Block a user