Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
Normal
Description
When a materialized view has a regular base column in its primary key, and that regular base column is deleted through a single-column deletion, the view does not handle it correctly, and may produce an error.
For example, with a table like:
CREATE TABLE foo ( a int, b int, c int, d int PRIMARY KEY (a, b) )
and a view like:
CREATE MATERIALIZED VIEW BAR AS SELECT * FROM foo WHERE ... PRIMARY KEY (a, d, b)
a deletion like this will not be handled correctly:
DELETE d FROM foo WHERE a = 0 AND b = 0
The source of the problem is that we aren't checking whether individual cells in the TemporalRow are live or not when building the clustering and partition key for the row. Instead, we're just using the cell value, which is an empty ByteBuffer.
I should have a patch with a fix and tests posted tomorrow.