RisingWave materialized-view NULL updates: compare missingness states explicitly
Changing a value to NULL is a state transition to preserve, not the absence of an update.
NULL is an explicit change
A NULL transition is an intended state change. Comparing only value columns with a Truthound operation that skips missing values can overlook the critical difference. Representing missingness as explicit Boolean fields makes this case easier to inspect. [1, 2, 3]
The source and direct query change, but the view does not
The public RisingWave reproduction groups a materialized view by a primary key and nullable column. After changing 7 to NULL, the view retains 7 while the base table and direct query return NULL. The report points to an internal last-non-null path; do not automatically classify it as ordinary refresh delay. [1]
Compare at the same FLUSH boundary
Include a non-null-to-NULL control. Join source, direct-query and materialized-view results by key at the same FLUSH boundary and compare their missingness states. Different read points make legitimate delay difficult to distinguish from a defect. Preserve flush identity alongside displayed values. [1, 3]
An illustrative state-as-data comparison
At an illustrative completed boundary where source_is_null is true, view_is_null must also be true. A true view_is_null state reflects the NULL transition at the same completed boundary. A false state means the view remains non-null despite the source change. Comparing explicit states rather than the numeric value avoids silently skipping the NULL and recording a false success. [1, 3]
The conditional Truthound expression
Truthound Core's ConditionalExpressionValidator can check whether source missingness is reflected in the view. Prepare the data with awareness that ordinary ColumnPair comparisons can exclude missing values. The feature does not repair view maintenance. If the direct-query control agrees with the source, isolate the materialized path and repeat the same transition test after correction. [1, 2, 3]
Application conditions
Extract source_is_null and view_is_null as non-null Boolean states from source, direct query and view for the same key and flush_boundary.
Alternatives
Compare the direct query and materialized view at the same FLUSH boundary.
Limitations
Ordinary ColumnPair comparisons can skip missing values, so encode missingness explicitly. Truthound does not repair view-maintenance functions.
Evidence
- Event checked
- Subject checked
- Modified
