Kyligence / ClickHouse

ClickHouse® is a free analytics DBMS for big data
https://clickhouse.com
Apache License 2.0
14 stars 17 forks source link

[CH-436] support columns with different nullable type when split for union #437

Open shuai-xu opened 1 year ago

shuai-xu commented 1 year ago

Changelog category (leave one):

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

This pr supports that when split blocks, they may have differnt nullable types as they may come from two different steams of union. It fix #436 .

kyligence-git commented 1 year ago

Can one of the admins verify this patch?

lgbo-ustc commented 1 year ago

The main problem here is that, the 1st block comed into ColumnBuffer could be non-nullable, but the later blocks come with nullable, and the real final schema shoul be nullable.

You can make an assumption that, if we meet a nullable column once, all results should be nullable. but we may have spill some blocks with non-nullable columns out into next stage before we meet the first block with nullable.