mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
Merge pull request #47121 from liding1992/master
Fix the problem that the 'ReplicatedMergeTree' table failed to insert two similar data when the 'part_type' is configured as 'InMemory' mode.
This commit is contained in:
commit
8292ffb81e
@ -187,8 +187,8 @@ public:
|
||||
|
||||
void updateHashFast(SipHash & hash) const override
|
||||
{
|
||||
hash.update(reinterpret_cast<const char *>(offsets.data()), size() * sizeof(offsets[0]));
|
||||
hash.update(reinterpret_cast<const char *>(chars.data()), size() * sizeof(chars[0]));
|
||||
hash.update(reinterpret_cast<const char *>(offsets.data()), offsets.size() * sizeof(offsets[0]));
|
||||
hash.update(reinterpret_cast<const char *>(chars.data()), chars.size() * sizeof(chars[0]));
|
||||
}
|
||||
|
||||
void insertRangeFrom(const IColumn & src, size_t start, size_t length) override;
|
||||
|
@ -0,0 +1 @@
|
||||
2
|
@ -0,0 +1,15 @@
|
||||
-- Tags: no-s3-storage
|
||||
|
||||
DROP TABLE IF EXISTS inmemory_test;
|
||||
|
||||
CREATE TABLE inmemory_test (d Date, id String)
|
||||
ENGINE=ReplicatedMergeTree('/clickhouse/tables/{database}/inmemory_test', 'r1')
|
||||
PARTITION BY toYYYYMMDD(d) ORDER BY (d, id)
|
||||
SETTINGS min_rows_for_compact_part = 10, index_granularity = 8192;
|
||||
|
||||
INSERT INTO inmemory_test(d, id) VALUES('2023-01-01', 'abcdefghijklmnopqrstuvwxyz');
|
||||
INSERT INTO inmemory_test(d, id) VALUES('2023-01-01', 'a1234567890123456789012345');
|
||||
|
||||
SELECT COUNT(1) FROM inmemory_test;
|
||||
|
||||
DROP TABLE inmemory_test;
|
Loading…
Reference in New Issue
Block a user