mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 18:42:26 +00:00
fix reading of empty arrays in reverse order
This commit is contained in:
parent
fcb83a12ff
commit
0595b5c22b
@ -62,7 +62,7 @@ void CompressedReadBufferFromFile::seek(size_t offset_in_compressed_file, size_t
|
||||
{
|
||||
/// Nothing to do if we already at required position
|
||||
if (!size_compressed && static_cast<size_t>(file_in.getPosition()) == offset_in_compressed_file && /// correct position in compressed file
|
||||
(offset() == offset_in_decompressed_block /// correct position in buffer or
|
||||
((!buffer().empty() && offset() == offset_in_decompressed_block) /// correct position in buffer or
|
||||
|| nextimpl_working_buffer_offset == offset_in_decompressed_block)) /// we will move our position to correct one
|
||||
return;
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
['x'] 0 ['1','2','3','4','5','6']
|
@ -0,0 +1,22 @@
|
||||
DROP TABLE IF EXISTS t_02267;
|
||||
|
||||
CREATE TABLE t_02267
|
||||
(
|
||||
a Array(String),
|
||||
b UInt32,
|
||||
c Array(String)
|
||||
)
|
||||
ENGINE = MergeTree
|
||||
ORDER BY b
|
||||
SETTINGS index_granularity = 500;
|
||||
|
||||
INSERT INTO t_02267 (b, a, c) SELECT 0, ['x'], ['1','2','3','4','5','6'] FROM numbers(1) ;
|
||||
INSERT INTO t_02267 (b, a, c) SELECT 1, [], ['1','2','3','4','5','6'] FROM numbers(300000);
|
||||
|
||||
OPTIMIZE TABLE t_02267 FINAL;
|
||||
|
||||
SELECT * FROM t_02267 WHERE hasAll(a, ['x'])
|
||||
ORDER BY b DESC
|
||||
SETTINGS max_threads=1, max_block_size=1000;
|
||||
|
||||
DROP TABLE IF EXISTS t_02267;
|
Loading…
Reference in New Issue
Block a user