In the case of an update to the source table where data is changed, a tombstone will be generated for the old value and an insert will be generated for the new value. This happens serially for the source partition, so if there are multiple updates to the same partition, a tombstone will be generated for each intermediate value.
This blog post has more details: http://www.datastax.com/dev/blog/new-in-cassandra-3-0-materialized-views -Carl On Dec 15, 2015 18:49, "Will Zhang" <weiliang.zh...@gmail.com> wrote: > Haven't had a chance to yet but I will. However, trying might not fully > explain what happens behind the scenes, ie, you'd see the effect but not > everything that happens. > > Thanks. > > Sent from my iPhone > > On 15 Dec 2015, at 23:41, Laing, Michael <michael.la...@nytimes.com> > wrote: > > why don't you just try it? > > On Tue, Dec 15, 2015 at 6:30 PM, Will Zhang <weiliang.zh...@gmail.com> > wrote: > >> Hi all, >> >> I originally raised this on SO, but not really getting any answer there, >> thought I give it a try here. >> >> >> Just thinking about this so please correct my understanding if any of >> this isn't right. >> >> Environment: Apache Cassandra v3.0.0 >> >> Say you have a table and a materialized view created on it: >> >> create table source( >> id text, field text, stamp timestamp, data text, >> primary key(id, field)) >> >> create materialized view myview as >> select * from source >> where data is not null and id is not null and field is not null >> primary key (data, field, id) >> >> My understanding is that myview.data would essentially be the partition >> key for the view here (and data in source is automatically replicated by >> the server into myview?). >> >> *If that is true, what happens internally when a table update is >> performed on source table and the source.data column is updated?* >> >> SO: >> http://stackoverflow.com/questions/33943960/apache-cassandra-3-0-0-materialized-view-can-the-views-partition-key-change-du >> >> Thanks, >> >> Will >> >> >> >> >