I am trying to create a table in ClickHouse with the following SQL
CREATE TABLE stage.test_int_null (
is_active Nullable(Int8),
name String
) ENGINE = MergeTree()
ORDER BY (tuple()) AS
select null as is_active,
'test' as name
I expected the table should be:
is_active | name |
---|---|
null | test |
Actually I got
is_active | name |
---|---|
0 | test |
I checked the doc and cannot find why is_acitve is set to 0 rather than null. Any suggestion?
Update: Not a Clickhouse issue, it is Metabase WebUI that displays it to 0.
It doesn't appear in the latest version, should be fixed now. Test here, where you can check with different versions.