title: Cassandra materialized view shows stale data
body: <p>I was trying out the Cassandra 3.0 alpha to see how materialized views work and following the example shown <a href="http://www.datastax.com/dev/blog/new-in-cassandra-3-0-materialized-views" rel="nofollow">here</a>.</p>
  
  <p>The example works when a whole partition is deleted from the base table, but when I delete an individual clustered row, it continues to appear in the materialized view.  Shouldn't a row deleted in the base table also disappear from the views?</p>
  
  <p>For example:</p>
  
  <pre><code>CREATE TABLE base (part int, clus int , val int, PRIMARY KEY (part, clus));
  CREATE MATERIALIZED VIEW view1 AS SELECT part FROM base WHERE part IS NOT NULL AND clus IS NOT NULL AND val IS NOT NULL PRIMARY KEY (val, part, clus);
  INSERT INTO base (part, clus, val) VALUES ( 1, 2, 200 );
  INSERT INTO base (part, clus, val) VALUES ( 1, 3, 300 );
  
  SELECT * FROM view1;
  
   val | part | clus
  -----+------+------
   200 |    1 |    2
   300 |    1 |    3
  </code></pre>
  
  <p>Then I delete just one of the rows:</p>
  
  <pre><code>DELETE FROM base WHERE part=1 and clus=3;
  </code></pre>
  
  <p>Now I was expecting val=300 to disappear from the view, but it didn't:</p>
  
  <pre><code>SELECT * FROM view1;
  
   val | part | clus
  -----+------+------
   200 |    1 |    2
   300 |    1 |    3
  </code></pre>
  
  <p>Next if I delete the whole partition, the clustering row I deleted earlier is left behind in the view:</p>
  
  <pre><code>DELETE FROM base WHERE part=1;
  
  SELECT * from base;
  
   clus | part | val
  ------+------+-----
  
  SELECT * FROM view1;
  
   val | part | clus
  -----+------+------
   300 |    1 |    3
  </code></pre>
  
  <p>I'm guessing this is a bug in the alpha release, but wanted to make sure this isn't the expected behavior.  Should I be able to delete individual clustered rows and see that reflected in the materialized views?</p>
  
  <p>I'm using this release:</p>
  
  <pre><code>nodetool version
  ReleaseVersion: 3.0.0-alpha1-SNAPSHOT
  </code></pre>
  
  <p>Thanks.</p>