mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 01:22:04 +00:00
Merge pull request #70205 from ClickHouse/backport/24.9/70127
Backport #70127 to 24.9: Fix wrong result with skipping index
This commit is contained in:
commit
9a435e4c9e
@ -100,7 +100,10 @@ void MergeTreeIndexGranuleSet::deserializeBinary(ReadBuffer & istr, MergeTreeInd
|
|||||||
size_t rows_to_read = field_rows.safeGet<size_t>();
|
size_t rows_to_read = field_rows.safeGet<size_t>();
|
||||||
|
|
||||||
if (rows_to_read == 0)
|
if (rows_to_read == 0)
|
||||||
|
{
|
||||||
|
block.clear();
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
size_t num_columns = block.columns();
|
size_t num_columns = block.columns();
|
||||||
|
|
||||||
|
@ -0,0 +1,2 @@
|
|||||||
|
22
|
||||||
|
22
|
19
tests/queries/0_stateless/03246_skipping_index_70108.sh
Executable file
19
tests/queries/0_stateless/03246_skipping_index_70108.sh
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||||
|
# shellcheck source=../shell_config.sh
|
||||||
|
. "$CURDIR"/../shell_config.sh
|
||||||
|
|
||||||
|
$CLICKHOUSE_LOCAL -m "
|
||||||
|
CREATE TABLE t
|
||||||
|
(
|
||||||
|
c0 UInt64,
|
||||||
|
c1 String,
|
||||||
|
INDEX c1_idx c1 TYPE set(666) GRANULARITY 1
|
||||||
|
)
|
||||||
|
ENGINE = MergeTree
|
||||||
|
ORDER BY c0;
|
||||||
|
INSERT INTO t SELECT * FROM file('$CURDIR/data_i70108/repro.tsv.zstd');
|
||||||
|
|
||||||
|
SELECT count() FROM t WHERE c1 = 'dedenk1d4q' SETTINGS use_skip_indexes=1;
|
||||||
|
SELECT count() FROM t WHERE c1 = 'dedenk1d4q' SETTINGS use_skip_indexes=0;
|
||||||
|
"
|
BIN
tests/queries/0_stateless/data_i70108/repro.tsv.zstd
Normal file
BIN
tests/queries/0_stateless/data_i70108/repro.tsv.zstd
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user