CREATE TABLE prefilter_last_row_null(
    host STRING,
    ts TIMESTAMP TIME INDEX,
    cpu DOUBLE,
    PRIMARY KEY(host)
) ENGINE=mito;

Affected Rows: 0

INSERT INTO prefilter_last_row_null(host, ts, cpu) VALUES ('host1', 0, NULL);

Affected Rows: 1

ADMIN FLUSH_TABLE('prefilter_last_row_null');

+----------------------------------------------+
| ADMIN FLUSH_TABLE('prefilter_last_row_null') |
+----------------------------------------------+
| 0                                            |
+----------------------------------------------+

INSERT INTO prefilter_last_row_null(host, ts, cpu) VALUES ('host1', 0, 10.0);

Affected Rows: 1

ADMIN FLUSH_TABLE('prefilter_last_row_null');

+----------------------------------------------+
| ADMIN FLUSH_TABLE('prefilter_last_row_null') |
+----------------------------------------------+
| 0                                            |
+----------------------------------------------+

SELECT COUNT(*) FROM prefilter_last_row_null WHERE cpu IS NULL;

+----------+
| count(*) |
+----------+
| 0        |
+----------+

ALTER TABLE prefilter_last_row_null ADD COLUMN memory DOUBLE NULL;

Affected Rows: 0

INSERT INTO prefilter_last_row_null(host, ts, cpu, memory) VALUES ('host1', 0, 10.0, 20.0);

Affected Rows: 1

ADMIN FLUSH_TABLE('prefilter_last_row_null');

+----------------------------------------------+
| ADMIN FLUSH_TABLE('prefilter_last_row_null') |
+----------------------------------------------+
| 0                                            |
+----------------------------------------------+

SELECT COUNT(*) FROM prefilter_last_row_null WHERE memory IS NULL;

+----------+
| count(*) |
+----------+
| 0        |
+----------+

DROP TABLE prefilter_last_row_null;

Affected Rows: 0

