mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 02:21:59 +00:00
Fixed error with NULLs [#CLICKHOUSE-2901].
This commit is contained in:
parent
02c2bb926f
commit
e6a41a0256
@ -171,7 +171,7 @@ void IMergedBlockOutputStream::writeDataImpl(
|
|||||||
writeIntBinary(stream.compressed.offset(), stream.marks);
|
writeIntBinary(stream.compressed.offset(), stream.marks);
|
||||||
}
|
}
|
||||||
|
|
||||||
DataTypeUInt8{}.serializeBinaryBulk(nullable_col.getNullMapConcreteColumn(), stream.compressed, 0, 0);
|
DataTypeUInt8{}.serializeBinaryBulk(nullable_col.getNullMapConcreteColumn(), stream.compressed, prev_mark, limit);
|
||||||
|
|
||||||
/// This way that instead of the marks pointing to the end of the compressed block, there were marks pointing to the beginning of the next one.
|
/// This way that instead of the marks pointing to the end of the compressed block, there were marks pointing to the beginning of the next one.
|
||||||
stream.compressed.nextIfAtEnd();
|
stream.compressed.nextIfAtEnd();
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
1000
|
@ -0,0 +1,5 @@
|
|||||||
|
DROP TABLE IF EXISTS test.nulls;
|
||||||
|
CREATE TABLE test.nulls (d Date, x Nullable(UInt64)) ENGINE = MergeTree(d, d, 8192);
|
||||||
|
INSERT INTO test.nulls SELECT toDate('2000-01-01'), number % 10 != 0 ? number : NULL FROM system.numbers LIMIT 10000;
|
||||||
|
SELECT count() FROM test.nulls WHERE x IS NULL;
|
||||||
|
DROP TABLE test.nulls;
|
Loading…
Reference in New Issue
Block a user