forked from ClickHouse/ClickHouse
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ClickHouse#49660 from CurtizJ/fix-sparse-columns-r…
…eload Fix reading from sparse columns after restart
- Loading branch information
1 parent
fcba523
commit 0eff70f
Showing
7 changed files
with
59 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
tests/queries/0_stateless/02733_sparse_columns_reload.reference
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
100000 | ||
100000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
DROP TABLE IF EXISTS t_sparse_reload; | ||
|
||
CREATE TABLE t_sparse_reload (id UInt64, v UInt64) | ||
ENGINE = MergeTree ORDER BY id | ||
SETTINGS ratio_of_defaults_for_sparse_serialization = 0.95; | ||
|
||
INSERT INTO t_sparse_reload SELECT number, 0 FROM numbers(100000); | ||
|
||
SELECT count() FROM t_sparse_reload WHERE NOT ignore(*); | ||
|
||
ALTER TABLE t_sparse_reload MODIFY SETTING ratio_of_defaults_for_sparse_serialization = 1.0; | ||
|
||
DETACH TABLE t_sparse_reload; | ||
ATTACH TABLE t_sparse_reload; | ||
|
||
SELECT count() FROM t_sparse_reload WHERE NOT ignore(*); | ||
|
||
DROP TABLE t_sparse_reload; |