cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject [01/16] cassandra git commit: Fix outstanding MV timestamp issues and add documentation about unsupported cases (see CASSANDRA-11500 for a summary of fixes)
Date Tue, 05 Sep 2017 06:08:28 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.0 b0eba5f9c -> 1b36740eb
  refs/heads/cassandra-3.11 14d67d81c -> e624c6638
  refs/heads/trunk 460360093 -> e6fb83028


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1b36740e/test/unit/org/apache/cassandra/cql3/ViewFilteringTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/cql3/ViewFilteringTest.java b/test/unit/org/apache/cassandra/cql3/ViewFilteringTest.java
index 245ceb7..fe618b6 100644
--- a/test/unit/org/apache/cassandra/cql3/ViewFilteringTest.java
+++ b/test/unit/org/apache/cassandra/cql3/ViewFilteringTest.java
@@ -77,13 +77,13 @@ public class ViewFilteringTest extends CQLTester
 
         // IS NOT NULL is required on all PK statements that are not otherwise restricted
         List<String> badStatements = Arrays.asList(
-                "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE b IS NOT NULL AND c IS NOT NULL AND d is NOT NULL PRIMARY KEY ((a, b), c, d)",
-                "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE a IS NOT NULL AND c IS NOT NULL AND d is NOT NULL PRIMARY KEY ((a, b), c, d)",
-                "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE a IS NOT NULL AND b IS NOT NULL AND d is NOT NULL PRIMARY KEY ((a, b), c, d)",
-                "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE a IS NOT NULL AND b IS NOT NULL AND c is NOT NULL PRIMARY KEY ((a, b), c, d)",
-                "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE a = ? AND b IS NOT NULL AND c is NOT NULL PRIMARY KEY ((a, b), c, d)",
-                "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE a = blobAsInt(?) AND b IS NOT NULL AND c is NOT NULL PRIMARY KEY ((a, b), c, d)",
-                "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s PRIMARY KEY (a, b, c, d)"
+        "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE b IS NOT NULL AND c IS NOT NULL AND d is NOT NULL PRIMARY KEY ((a, b), c, d)",
+        "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE a IS NOT NULL AND c IS NOT NULL AND d is NOT NULL PRIMARY KEY ((a, b), c, d)",
+        "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE a IS NOT NULL AND b IS NOT NULL AND d is NOT NULL PRIMARY KEY ((a, b), c, d)",
+        "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE a IS NOT NULL AND b IS NOT NULL AND c is NOT NULL PRIMARY KEY ((a, b), c, d)",
+        "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE a = ? AND b IS NOT NULL AND c is NOT NULL PRIMARY KEY ((a, b), c, d)",
+        "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE a = blobAsInt(?) AND b IS NOT NULL AND c is NOT NULL PRIMARY KEY ((a, b), c, d)",
+        "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s PRIMARY KEY (a, b, c, d)"
         );
 
         for (String badStatement : badStatements)
@@ -96,19 +96,19 @@ public class ViewFilteringTest extends CQLTester
             catch (InvalidQueryException exc) {}
         }
 
-        List<String> goodStatements = Arrays.asList(
-                "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE a = 1 AND b = 1 AND c IS NOT NULL AND d is NOT NULL PRIMARY KEY ((a, b), c, d)",
-                "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE a IS NOT NULL AND b IS NOT NULL AND c = 1 AND d IS NOT NULL PRIMARY KEY ((a, b), c, d)",
-                "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE a IS NOT NULL AND b IS NOT NULL AND c = 1 AND d = 1 PRIMARY KEY ((a, b), c, d)",
-                "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE a = 1 AND b = 1 AND c = 1 AND d = 1 PRIMARY KEY ((a, b), c, d)",
-                "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE a = 1 AND b = 1 AND c > 1 AND d IS NOT NULL PRIMARY KEY ((a, b), c, d)",
-                "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE a = 1 AND b = 1 AND c = 1 AND d IN (1, 2, 3) PRIMARY KEY ((a, b), c, d)",
-                "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE a = 1 AND b = 1 AND (c, d) = (1, 1) PRIMARY KEY ((a, b), c, d)",
-                "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE a = 1 AND b = 1 AND (c, d) > (1, 1) PRIMARY KEY ((a, b), c, d)",
-                "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE a = 1 AND b = 1 AND (c, d) IN ((1, 1), (2, 2)) PRIMARY KEY ((a, b), c, d)",
-                "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE a = (int) 1 AND b = 1 AND c = 1 AND d = 1 PRIMARY KEY ((a, b), c, d)",
-                "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE a = blobAsInt(intAsBlob(1)) AND b = 1 AND c = 1 AND d = 1 PRIMARY KEY ((a, b), c, d)"
-        );
+            List<String> goodStatements = Arrays.asList(
+            "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE a = 1 AND b = 1 AND c IS NOT NULL AND d is NOT NULL PRIMARY KEY ((a, b), c, d)",
+            "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE a IS NOT NULL AND b IS NOT NULL AND c = 1 AND d IS NOT NULL PRIMARY KEY ((a, b), c, d)",
+            "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE a IS NOT NULL AND b IS NOT NULL AND c = 1 AND d = 1 PRIMARY KEY ((a, b), c, d)",
+            "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE a = 1 AND b = 1 AND c = 1 AND d = 1 PRIMARY KEY ((a, b), c, d)",
+            "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE a = 1 AND b = 1 AND c > 1 AND d IS NOT NULL PRIMARY KEY ((a, b), c, d)",
+            "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE a = 1 AND b = 1 AND c = 1 AND d IN (1, 2, 3) PRIMARY KEY ((a, b), c, d)",
+            "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE a = 1 AND b = 1 AND (c, d) = (1, 1) PRIMARY KEY ((a, b), c, d)",
+            "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE a = 1 AND b = 1 AND (c, d) > (1, 1) PRIMARY KEY ((a, b), c, d)",
+            "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE a = 1 AND b = 1 AND (c, d) IN ((1, 1), (2, 2)) PRIMARY KEY ((a, b), c, d)",
+            "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE a = (int) 1 AND b = 1 AND c = 1 AND d = 1 PRIMARY KEY ((a, b), c, d)",
+            "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE a = blobAsInt(intAsBlob(1)) AND b = 1 AND c = 1 AND d = 1 PRIMARY KEY ((a, b), c, d)"
+            );
 
         for (int i = 0; i < goodStatements.size(); i++)
         {
@@ -153,21 +153,21 @@ public class ViewFilteringTest extends CQLTester
         execute("INSERT INTO %s (\"theKey\", \"theClustering\", \"the\"\"Value\") VALUES (?, ?, ?)", 1, 1, 0);
 
         createView("mv_test", "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s " +
-                "WHERE \"theKey\" = 1 AND \"theClustering\" = 1 AND \"the\"\"Value\" IS NOT NULL " +
-                "PRIMARY KEY (\"theKey\", \"theClustering\")");
+                              "WHERE \"theKey\" = 1 AND \"theClustering\" = 1 AND \"the\"\"Value\" IS NOT NULL " +
+                              "PRIMARY KEY (\"theKey\", \"theClustering\")");
 
         while (!SystemKeyspace.isViewBuilt(keyspace(), "mv_test"))
             Thread.sleep(10);
         createView("mv_test2", "CREATE MATERIALIZED VIEW %s AS SELECT \"theKey\", \"theClustering\", \"the\"\"Value\" FROM %%s " +
-                "WHERE \"theKey\" = 1 AND \"theClustering\" = 1 AND \"the\"\"Value\" IS NOT NULL " +
-                "PRIMARY KEY (\"theKey\", \"theClustering\")");
+                               "WHERE \"theKey\" = 1 AND \"theClustering\" = 1 AND \"the\"\"Value\" IS NOT NULL " +
+                               "PRIMARY KEY (\"theKey\", \"theClustering\")");
         while (!SystemKeyspace.isViewBuilt(keyspace(), "mv_test2"))
             Thread.sleep(10);
 
         for (String mvname : Arrays.asList("mv_test", "mv_test2"))
         {
             assertRowsIgnoringOrder(execute("SELECT \"theKey\", \"theClustering\", \"the\"\"Value\" FROM " + mvname),
-                    row(1, 1, 0)
+                                    row(1, 1, 0)
             );
         }
 
@@ -176,7 +176,7 @@ public class ViewFilteringTest extends CQLTester
         for (String mvname : Arrays.asList("mv_test", "mv_test2"))
         {
             assertRowsIgnoringOrder(execute("SELECT \"theKey\", \"Col\", \"the\"\"Value\" FROM " + mvname),
-                    row(1, 1, 0)
+                                    row(1, 1, 0)
             );
         }
     }
@@ -195,22 +195,22 @@ public class ViewFilteringTest extends CQLTester
         execute("INSERT INTO %s (a, b, c) VALUES (?, ?, ?)", 1, 1, 3);
 
         createView("mv_test", "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s " +
-                "WHERE a = blobAsInt(intAsBlob(1)) AND b IS NOT NULL " +
-                "PRIMARY KEY (a, b)");
+                              "WHERE a = blobAsInt(intAsBlob(1)) AND b IS NOT NULL " +
+                              "PRIMARY KEY (a, b)");
 
         while (!SystemKeyspace.isViewBuilt(keyspace(), "mv_test"))
             Thread.sleep(10);
 
         assertRows(execute("SELECT a, b, c FROM mv_test"),
-                row(1, 0, 2),
-                row(1, 1, 3)
+                   row(1, 0, 2),
+                   row(1, 1, 3)
         );
 
         executeNet(protocolVersion, "ALTER TABLE %s RENAME a TO foo");
 
         assertRows(execute("SELECT foo, b, c FROM mv_test"),
-                row(1, 0, 2),
-                row(1, 1, 3)
+                   row(1, 0, 2),
+                   row(1, 1, 3)
         );
     }
 
@@ -228,22 +228,22 @@ public class ViewFilteringTest extends CQLTester
         execute("INSERT INTO %s (a, b, c) VALUES (?, ?, ?)", 1, 1, 3);
 
         createView("mv_test", "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s " +
-                "WHERE a = (int) 1 AND b IS NOT NULL " +
-                "PRIMARY KEY (a, b)");
+                              "WHERE a = (int) 1 AND b IS NOT NULL " +
+                              "PRIMARY KEY (a, b)");
 
         while (!SystemKeyspace.isViewBuilt(keyspace(), "mv_test"))
             Thread.sleep(10);
 
         assertRows(execute("SELECT a, b, c FROM mv_test"),
-                row(1, 0, 2),
-                row(1, 1, 3)
+                   row(1, 0, 2),
+                   row(1, 1, 3)
         );
 
         executeNet(protocolVersion, "ALTER TABLE %s RENAME a TO foo");
 
         assertRows(execute("SELECT foo, b, c FROM mv_test"),
-                row(1, 0, 2),
-                row(1, 1, 3)
+                   row(1, 0, 2),
+                   row(1, 1, 3)
         );
     }
 
@@ -274,51 +274,51 @@ public class ViewFilteringTest extends CQLTester
                 Thread.sleep(10);
 
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(1, 0, 0, 0),
-                    row(1, 0, 1, 0),
-                    row(1, 1, 0, 0),
-                    row(1, 1, 1, 0)
+                                    row(1, 0, 0, 0),
+                                    row(1, 0, 1, 0),
+                                    row(1, 1, 0, 0),
+                                    row(1, 1, 1, 0)
             );
 
             // insert new rows that do not match the filter
             execute("INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?)", 2, 0, 0, 0);
             execute("INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?)", 2, 1, 0, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(1, 0, 0, 0),
-                    row(1, 0, 1, 0),
-                    row(1, 1, 0, 0),
-                    row(1, 1, 1, 0)
+                                    row(1, 0, 0, 0),
+                                    row(1, 0, 1, 0),
+                                    row(1, 1, 0, 0),
+                                    row(1, 1, 1, 0)
             );
 
             // insert new row that does match the filter
             execute("INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?)", 1, 1, 2, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(1, 0, 0, 0),
-                    row(1, 0, 1, 0),
-                    row(1, 1, 0, 0),
-                    row(1, 1, 1, 0),
-                    row(1, 1, 2, 0)
+                                    row(1, 0, 0, 0),
+                                    row(1, 0, 1, 0),
+                                    row(1, 1, 0, 0),
+                                    row(1, 1, 1, 0),
+                                    row(1, 1, 2, 0)
             );
 
             // update rows that don't match the filter
             execute("UPDATE %s SET d = ? WHERE a = ? AND b = ? AND c = ?", 1, 0, 0, 0);
             execute("UPDATE %s SET d = ? WHERE a = ? AND b = ? AND c = ?", 1, 0, 1, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(1, 0, 0, 0),
-                    row(1, 0, 1, 0),
-                    row(1, 1, 0, 0),
-                    row(1, 1, 1, 0),
-                    row(1, 1, 2, 0)
+                                    row(1, 0, 0, 0),
+                                    row(1, 0, 1, 0),
+                                    row(1, 1, 0, 0),
+                                    row(1, 1, 1, 0),
+                                    row(1, 1, 2, 0)
             );
 
             // update a row that does match the filter
             execute("UPDATE %s SET d = ? WHERE a = ? AND b = ? AND c = ?", 1, 1, 1, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(1, 0, 0, 0),
-                    row(1, 0, 1, 0),
-                    row(1, 1, 0, 1),
-                    row(1, 1, 1, 0),
-                    row(1, 1, 2, 0)
+                                    row(1, 0, 0, 0),
+                                    row(1, 0, 1, 0),
+                                    row(1, 1, 0, 1),
+                                    row(1, 1, 1, 0),
+                                    row(1, 1, 2, 0)
             );
 
             // delete rows that don't match the filter
@@ -326,20 +326,20 @@ public class ViewFilteringTest extends CQLTester
             execute("DELETE FROM %s WHERE a = ? AND b = ? AND c = ?", 0, 1, 0);
             execute("DELETE FROM %s WHERE a = ? AND b = ?", 0, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(1, 0, 0, 0),
-                    row(1, 0, 1, 0),
-                    row(1, 1, 0, 1),
-                    row(1, 1, 1, 0),
-                    row(1, 1, 2, 0)
+                                    row(1, 0, 0, 0),
+                                    row(1, 0, 1, 0),
+                                    row(1, 1, 0, 1),
+                                    row(1, 1, 1, 0),
+                                    row(1, 1, 2, 0)
             );
 
             // delete a row that does match the filter
             execute("DELETE FROM %s WHERE a = ? AND b = ? AND c = ?", 1, 1, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(1, 0, 0, 0),
-                    row(1, 0, 1, 0),
-                    row(1, 1, 1, 0),
-                    row(1, 1, 2, 0)
+                                    row(1, 0, 0, 0),
+                                    row(1, 0, 1, 0),
+                                    row(1, 1, 1, 0),
+                                    row(1, 1, 2, 0)
             );
 
             // delete a partition that matches the filter
@@ -377,8 +377,8 @@ public class ViewFilteringTest extends CQLTester
                 Thread.sleep(10);
 
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(1, 1, 0, 0),
-                    row(1, 1, 1, 0)
+                                    row(1, 1, 0, 0),
+                                    row(1, 1, 1, 0)
             );
 
             // insert new rows that do not match the filter
@@ -386,16 +386,16 @@ public class ViewFilteringTest extends CQLTester
             execute("INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?)", 2, 1, 0, 0);
             execute("INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?)", 1, 2, 0, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(1, 1, 0, 0),
-                    row(1, 1, 1, 0)
+                                    row(1, 1, 0, 0),
+                                    row(1, 1, 1, 0)
             );
 
             // insert new row that does match the filter
             execute("INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?)", 1, 1, 2, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(1, 1, 0, 0),
-                    row(1, 1, 1, 0),
-                    row(1, 1, 2, 0)
+                                    row(1, 1, 0, 0),
+                                    row(1, 1, 1, 0),
+                                    row(1, 1, 2, 0)
             );
 
             // update rows that don't match the filter
@@ -403,17 +403,17 @@ public class ViewFilteringTest extends CQLTester
             execute("UPDATE %s SET d = ? WHERE a = ? AND b = ? AND c = ?", 1, 1, 0, 0);
             execute("UPDATE %s SET d = ? WHERE a = ? AND b = ? AND c = ?", 1, 0, 1, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(1, 1, 0, 0),
-                    row(1, 1, 1, 0),
-                    row(1, 1, 2, 0)
+                                    row(1, 1, 0, 0),
+                                    row(1, 1, 1, 0),
+                                    row(1, 1, 2, 0)
             );
 
             // update a row that does match the filter
             execute("UPDATE %s SET d = ? WHERE a = ? AND b = ? AND c = ?", 1, 1, 1, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(1, 1, 0, 1),
-                    row(1, 1, 1, 0),
-                    row(1, 1, 2, 0)
+                                    row(1, 1, 0, 1),
+                                    row(1, 1, 1, 0),
+                                    row(1, 1, 2, 0)
             );
 
             // delete rows that don't match the filter
@@ -422,16 +422,16 @@ public class ViewFilteringTest extends CQLTester
             execute("DELETE FROM %s WHERE a = ? AND b = ? AND c = ?", 0, 1, 0);
             execute("DELETE FROM %s WHERE a = ? AND b = ?", 0, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(1, 1, 0, 1),
-                    row(1, 1, 1, 0),
-                    row(1, 1, 2, 0)
+                                    row(1, 1, 0, 1),
+                                    row(1, 1, 1, 0),
+                                    row(1, 1, 2, 0)
             );
 
             // delete a row that does match the filter
             execute("DELETE FROM %s WHERE a = ? AND b = ? AND c = ?", 1, 1, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(1, 1, 1, 0),
-                    row(1, 1, 2, 0)
+                                    row(1, 1, 1, 0),
+                                    row(1, 1, 2, 0)
             );
 
             // delete a partition that matches the filter
@@ -463,8 +463,8 @@ public class ViewFilteringTest extends CQLTester
             Thread.sleep(10);
 
         assertRows(execute("SELECT * FROM mv_test"),
-            row(1, 1, 0),
-            row(1, 1, 1)
+                   row(1, 1, 0),
+                   row(1, 1, 1)
         );
 
         // insert new rows that do not match the filter
@@ -472,16 +472,16 @@ public class ViewFilteringTest extends CQLTester
         execute("INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?)", 2, 1, 0, 0);
         execute("INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?)", 1, 2, 0, 0);
         assertRows(execute("SELECT * FROM mv_test"),
-                row(1, 1, 0),
-                row(1, 1, 1)
+                   row(1, 1, 0),
+                   row(1, 1, 1)
         );
 
         // insert new row that does match the filter
         execute("INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?)", 1, 1, 2, 0);
         assertRows(execute("SELECT * FROM mv_test"),
-                row(1, 1, 0),
-                row(1, 1, 1),
-                row(1, 1, 2)
+                   row(1, 1, 0),
+                   row(1, 1, 1),
+                   row(1, 1, 2)
         );
 
         // update rows that don't match the filter
@@ -489,17 +489,17 @@ public class ViewFilteringTest extends CQLTester
         execute("UPDATE %s SET d = ? WHERE a = ? AND b = ? AND c = ?", 1, 1, 0, 0);
         execute("UPDATE %s SET d = ? WHERE a = ? AND b = ? AND c = ?", 1, 0, 1, 0);
         assertRows(execute("SELECT * FROM mv_test"),
-                row(1, 1, 0),
-                row(1, 1, 1),
-                row(1, 1, 2)
+                   row(1, 1, 0),
+                   row(1, 1, 1),
+                   row(1, 1, 2)
         );
 
         // update a row that does match the filter
         execute("UPDATE %s SET d = ? WHERE a = ? AND b = ? AND c = ?", 1, 1, 1, 0);
         assertRows(execute("SELECT * FROM mv_test"),
-                row(1, 1, 0),
-                row(1, 1, 1),
-                row(1, 1, 2)
+                   row(1, 1, 0),
+                   row(1, 1, 1),
+                   row(1, 1, 2)
         );
 
         // delete rows that don't match the filter
@@ -508,16 +508,16 @@ public class ViewFilteringTest extends CQLTester
         execute("DELETE FROM %s WHERE a = ? AND b = ? AND c = ?", 0, 1, 0);
         execute("DELETE FROM %s WHERE a = ? AND b = ?", 0, 0);
         assertRows(execute("SELECT * FROM mv_test"),
-                row(1, 1, 0),
-                row(1, 1, 1),
-                row(1, 1, 2)
+                   row(1, 1, 0),
+                   row(1, 1, 1),
+                   row(1, 1, 2)
         );
 
         // delete a row that does match the filter
         execute("DELETE FROM %s WHERE a = ? AND b = ? AND c = ?", 1, 1, 0);
         assertRows(execute("SELECT * FROM mv_test"),
-                row(1, 1, 1),
-                row(1, 1, 2)
+                   row(1, 1, 1),
+                   row(1, 1, 2)
         );
 
         // delete a partition that matches the filter
@@ -554,51 +554,51 @@ public class ViewFilteringTest extends CQLTester
                 Thread.sleep(10);
 
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 1, 0, 0),
-                    row(0, 1, 1, 0),
-                    row(1, 1, 0, 0),
-                    row(1, 1, 1, 0)
+                                    row(0, 1, 0, 0),
+                                    row(0, 1, 1, 0),
+                                    row(1, 1, 0, 0),
+                                    row(1, 1, 1, 0)
             );
 
             // insert new rows that do not match the filter
             execute("INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?)", 2, 0, 0, 0);
             execute("INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?)", 2, 2, 0, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 1, 0, 0),
-                    row(0, 1, 1, 0),
-                    row(1, 1, 0, 0),
-                    row(1, 1, 1, 0)
+                                    row(0, 1, 0, 0),
+                                    row(0, 1, 1, 0),
+                                    row(1, 1, 0, 0),
+                                    row(1, 1, 1, 0)
             );
 
             // insert new row that does match the filter
             execute("INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?)", 1, 1, 2, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 1, 0, 0),
-                    row(0, 1, 1, 0),
-                    row(1, 1, 0, 0),
-                    row(1, 1, 1, 0),
-                    row(1, 1, 2, 0)
+                                    row(0, 1, 0, 0),
+                                    row(0, 1, 1, 0),
+                                    row(1, 1, 0, 0),
+                                    row(1, 1, 1, 0),
+                                    row(1, 1, 2, 0)
             );
 
             // update rows that don't match the filter
             execute("UPDATE %s SET d = ? WHERE a = ? AND b = ? AND c = ?", 1, 2, 0, 0);
             execute("UPDATE %s SET d = ? WHERE a = ? AND b = ? AND c = ?", 1, 2, 2, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 1, 0, 0),
-                    row(0, 1, 1, 0),
-                    row(1, 1, 0, 0),
-                    row(1, 1, 1, 0),
-                    row(1, 1, 2, 0)
+                                    row(0, 1, 0, 0),
+                                    row(0, 1, 1, 0),
+                                    row(1, 1, 0, 0),
+                                    row(1, 1, 1, 0),
+                                    row(1, 1, 2, 0)
             );
 
             // update a row that does match the filter
             execute("UPDATE %s SET d = ? WHERE a = ? AND b = ? AND c = ?", 1, 1, 1, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 1, 0, 0),
-                    row(0, 1, 1, 0),
-                    row(1, 1, 0, 1),
-                    row(1, 1, 1, 0),
-                    row(1, 1, 2, 0)
+                                    row(0, 1, 0, 0),
+                                    row(0, 1, 1, 0),
+                                    row(1, 1, 0, 1),
+                                    row(1, 1, 1, 0),
+                                    row(1, 1, 2, 0)
             );
 
             // delete rows that don't match the filter
@@ -606,27 +606,27 @@ public class ViewFilteringTest extends CQLTester
             execute("DELETE FROM %s WHERE a = ? AND b = ? AND c = ?", 2, 2, 0);
             execute("DELETE FROM %s WHERE a = ? AND b = ?", 0, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 1, 0, 0),
-                    row(0, 1, 1, 0),
-                    row(1, 1, 0, 1),
-                    row(1, 1, 1, 0),
-                    row(1, 1, 2, 0)
+                                    row(0, 1, 0, 0),
+                                    row(0, 1, 1, 0),
+                                    row(1, 1, 0, 1),
+                                    row(1, 1, 1, 0),
+                                    row(1, 1, 2, 0)
             );
 
             // delete a row that does match the filter
             execute("DELETE FROM %s WHERE a = ? AND b = ? AND c = ?", 1, 1, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 1, 0, 0),
-                    row(0, 1, 1, 0),
-                    row(1, 1, 1, 0),
-                    row(1, 1, 2, 0)
+                                    row(0, 1, 0, 0),
+                                    row(0, 1, 1, 0),
+                                    row(1, 1, 1, 0),
+                                    row(1, 1, 2, 0)
             );
 
             // delete a partition that matches the filter
             execute("DELETE FROM %s WHERE a = ?", 1);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                row(0, 1, 0, 0),
-                row(0, 1, 1, 0)
+                                    row(0, 1, 0, 0),
+                                    row(0, 1, 1, 0)
             );
 
             dropView("mv_test" + i);
@@ -662,51 +662,51 @@ public class ViewFilteringTest extends CQLTester
                 Thread.sleep(10);
 
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 1, 0, 0),
-                    row(0, 1, 1, 0),
-                    row(1, 1, 0, 0),
-                    row(1, 1, 1, 0)
+                                    row(0, 1, 0, 0),
+                                    row(0, 1, 1, 0),
+                                    row(1, 1, 0, 0),
+                                    row(1, 1, 1, 0)
             );
 
             // insert new rows that do not match the filter
             execute("INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?)", 2, -1, 0, 0);
             execute("INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?)", 2, 0, 0, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 1, 0, 0),
-                    row(0, 1, 1, 0),
-                    row(1, 1, 0, 0),
-                    row(1, 1, 1, 0)
+                                    row(0, 1, 0, 0),
+                                    row(0, 1, 1, 0),
+                                    row(1, 1, 0, 0),
+                                    row(1, 1, 1, 0)
             );
 
             // insert new row that does match the filter
             execute("INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?)", 1, 1, 2, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 1, 0, 0),
-                    row(0, 1, 1, 0),
-                    row(1, 1, 0, 0),
-                    row(1, 1, 1, 0),
-                    row(1, 1, 2, 0)
+                                    row(0, 1, 0, 0),
+                                    row(0, 1, 1, 0),
+                                    row(1, 1, 0, 0),
+                                    row(1, 1, 1, 0),
+                                    row(1, 1, 2, 0)
             );
 
             // update rows that don't match the filter
             execute("UPDATE %s SET d = ? WHERE a = ? AND b = ? AND c = ?", 1, 2, -1, 0);
             execute("UPDATE %s SET d = ? WHERE a = ? AND b = ? AND c = ?", 1, 2, 0, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 1, 0, 0),
-                    row(0, 1, 1, 0),
-                    row(1, 1, 0, 0),
-                    row(1, 1, 1, 0),
-                    row(1, 1, 2, 0)
+                                    row(0, 1, 0, 0),
+                                    row(0, 1, 1, 0),
+                                    row(1, 1, 0, 0),
+                                    row(1, 1, 1, 0),
+                                    row(1, 1, 2, 0)
             );
 
             // update a row that does match the filter
             execute("UPDATE %s SET d = ? WHERE a = ? AND b = ? AND c = ?", 1, 1, 1, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 1, 0, 0),
-                    row(0, 1, 1, 0),
-                    row(1, 1, 0, 1),
-                    row(1, 1, 1, 0),
-                    row(1, 1, 2, 0)
+                                    row(0, 1, 0, 0),
+                                    row(0, 1, 1, 0),
+                                    row(1, 1, 0, 1),
+                                    row(1, 1, 1, 0),
+                                    row(1, 1, 2, 0)
             );
 
             // delete rows that don't match the filter
@@ -714,27 +714,27 @@ public class ViewFilteringTest extends CQLTester
             execute("DELETE FROM %s WHERE a = ? AND b = ? AND c = ?", 2, 0, 0);
             execute("DELETE FROM %s WHERE a = ? AND b = ?", 0, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 1, 0, 0),
-                    row(0, 1, 1, 0),
-                    row(1, 1, 0, 1),
-                    row(1, 1, 1, 0),
-                    row(1, 1, 2, 0)
+                                    row(0, 1, 0, 0),
+                                    row(0, 1, 1, 0),
+                                    row(1, 1, 0, 1),
+                                    row(1, 1, 1, 0),
+                                    row(1, 1, 2, 0)
             );
 
             // delete a row that does match the filter
             execute("DELETE FROM %s WHERE a = ? AND b = ? AND c = ?", 1, 1, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 1, 0, 0),
-                    row(0, 1, 1, 0),
-                    row(1, 1, 1, 0),
-                    row(1, 1, 2, 0)
+                                    row(0, 1, 0, 0),
+                                    row(0, 1, 1, 0),
+                                    row(1, 1, 1, 0),
+                                    row(1, 1, 2, 0)
             );
 
             // delete a partition that matches the filter
             execute("DELETE FROM %s WHERE a = ?", 1);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 1, 0, 0),
-                    row(0, 1, 1, 0)
+                                    row(0, 1, 0, 0),
+                                    row(0, 1, 1, 0)
             );
 
             dropView("mv_test" + i);
@@ -772,56 +772,56 @@ public class ViewFilteringTest extends CQLTester
                 Thread.sleep(10);
 
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 1, 0, 0),
-                    row(0, 1, 1, 0),
-                    row(1, 1, 0, 0),
-                    row(1, 1, 1, 0),
-                    row(1, 2, 1, 0)
+                                    row(0, 1, 0, 0),
+                                    row(0, 1, 1, 0),
+                                    row(1, 1, 0, 0),
+                                    row(1, 1, 1, 0),
+                                    row(1, 2, 1, 0)
             );
 
             // insert new rows that do not match the filter
             execute("INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?)", 2, -1, 0, 0);
             execute("INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?)", 2, 0, 0, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 1, 0, 0),
-                    row(0, 1, 1, 0),
-                    row(1, 1, 0, 0),
-                    row(1, 1, 1, 0),
-                    row(1, 2, 1, 0)
+                                    row(0, 1, 0, 0),
+                                    row(0, 1, 1, 0),
+                                    row(1, 1, 0, 0),
+                                    row(1, 1, 1, 0),
+                                    row(1, 2, 1, 0)
             );
 
             // insert new row that does match the filter
             execute("INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?)", 1, 1, 2, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 1, 0, 0),
-                    row(0, 1, 1, 0),
-                    row(1, 1, 0, 0),
-                    row(1, 1, 1, 0),
-                    row(1, 1, 2, 0),
-                    row(1, 2, 1, 0)
+                                    row(0, 1, 0, 0),
+                                    row(0, 1, 1, 0),
+                                    row(1, 1, 0, 0),
+                                    row(1, 1, 1, 0),
+                                    row(1, 1, 2, 0),
+                                    row(1, 2, 1, 0)
             );
 
             // update rows that don't match the filter
             execute("UPDATE %s SET d = ? WHERE a = ? AND b = ? AND c = ?", 1, 2, -1, 0);
             execute("UPDATE %s SET d = ? WHERE a = ? AND b = ? AND c = ?", 1, 2, 0, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 1, 0, 0),
-                    row(0, 1, 1, 0),
-                    row(1, 1, 0, 0),
-                    row(1, 1, 1, 0),
-                    row(1, 1, 2, 0),
-                    row(1, 2, 1, 0)
+                                    row(0, 1, 0, 0),
+                                    row(0, 1, 1, 0),
+                                    row(1, 1, 0, 0),
+                                    row(1, 1, 1, 0),
+                                    row(1, 1, 2, 0),
+                                    row(1, 2, 1, 0)
             );
 
             // update a row that does match the filter
             execute("UPDATE %s SET d = ? WHERE a = ? AND b = ? AND c = ?", 1, 1, 1, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 1, 0, 0),
-                    row(0, 1, 1, 0),
-                    row(1, 1, 0, 1),
-                    row(1, 1, 1, 0),
-                    row(1, 1, 2, 0),
-                    row(1, 2, 1, 0)
+                                    row(0, 1, 0, 0),
+                                    row(0, 1, 1, 0),
+                                    row(1, 1, 0, 1),
+                                    row(1, 1, 1, 0),
+                                    row(1, 1, 2, 0),
+                                    row(1, 2, 1, 0)
             );
 
             // delete rows that don't match the filter
@@ -829,29 +829,29 @@ public class ViewFilteringTest extends CQLTester
             execute("DELETE FROM %s WHERE a = ? AND b = ? AND c = ?", 2, 0, 0);
             execute("DELETE FROM %s WHERE a = ? AND b = ?", 0, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 1, 0, 0),
-                    row(0, 1, 1, 0),
-                    row(1, 1, 0, 1),
-                    row(1, 1, 1, 0),
-                    row(1, 1, 2, 0),
-                    row(1, 2, 1, 0)
+                                    row(0, 1, 0, 0),
+                                    row(0, 1, 1, 0),
+                                    row(1, 1, 0, 1),
+                                    row(1, 1, 1, 0),
+                                    row(1, 1, 2, 0),
+                                    row(1, 2, 1, 0)
             );
 
             // delete a row that does match the filter
             execute("DELETE FROM %s WHERE a = ? AND b = ? AND c = ?", 1, 1, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 1, 0, 0),
-                    row(0, 1, 1, 0),
-                    row(1, 1, 1, 0),
-                    row(1, 1, 2, 0),
-                    row(1, 2, 1, 0)
+                                    row(0, 1, 0, 0),
+                                    row(0, 1, 1, 0),
+                                    row(1, 1, 1, 0),
+                                    row(1, 1, 2, 0),
+                                    row(1, 2, 1, 0)
             );
 
             // delete a partition that matches the filter
             execute("DELETE FROM %s WHERE a = ?", 1);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 1, 0, 0),
-                    row(0, 1, 1, 0)
+                                    row(0, 1, 0, 0),
+                                    row(0, 1, 1, 0)
             );
 
             dropView("mv_test" + i);
@@ -889,10 +889,10 @@ public class ViewFilteringTest extends CQLTester
                 Thread.sleep(10);
 
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 1, 0, 0),
-                    row(0, 1, 1, 0),
-                    row(1, 1, 0, 0),
-                    row(1, 1, 1, 0)
+                                    row(0, 1, 0, 0),
+                                    row(0, 1, 1, 0),
+                                    row(1, 1, 0, 0),
+                                    row(1, 1, 1, 0)
             );
 
             // insert new rows that do not match the filter
@@ -900,20 +900,20 @@ public class ViewFilteringTest extends CQLTester
             execute("INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?)", 2, 0, 0, 0);
             execute("INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?)", 2, 1, -1, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 1, 0, 0),
-                    row(0, 1, 1, 0),
-                    row(1, 1, 0, 0),
-                    row(1, 1, 1, 0)
+                                    row(0, 1, 0, 0),
+                                    row(0, 1, 1, 0),
+                                    row(1, 1, 0, 0),
+                                    row(1, 1, 1, 0)
             );
 
             // insert new row that does match the filter
             execute("INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?)", 1, 1, 2, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 1, 0, 0),
-                    row(0, 1, 1, 0),
-                    row(1, 1, 0, 0),
-                    row(1, 1, 1, 0),
-                    row(1, 1, 2, 0)
+                                    row(0, 1, 0, 0),
+                                    row(0, 1, 1, 0),
+                                    row(1, 1, 0, 0),
+                                    row(1, 1, 1, 0),
+                                    row(1, 1, 2, 0)
             );
 
             // update rows that don't match the filter
@@ -921,21 +921,21 @@ public class ViewFilteringTest extends CQLTester
             execute("UPDATE %s SET d = ? WHERE a = ? AND b = ? AND c = ?", 1, 2, -1, 0);
             execute("UPDATE %s SET d = ? WHERE a = ? AND b = ? AND c = ?", 1, 2, 0, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 1, 0, 0),
-                    row(0, 1, 1, 0),
-                    row(1, 1, 0, 0),
-                    row(1, 1, 1, 0),
-                    row(1, 1, 2, 0)
+                                    row(0, 1, 0, 0),
+                                    row(0, 1, 1, 0),
+                                    row(1, 1, 0, 0),
+                                    row(1, 1, 1, 0),
+                                    row(1, 1, 2, 0)
             );
 
             // update a row that does match the filter
             execute("UPDATE %s SET d = ? WHERE a = ? AND b = ? AND c = ?", 1, 1, 1, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 1, 0, 0),
-                    row(0, 1, 1, 0),
-                    row(1, 1, 0, 1),
-                    row(1, 1, 1, 0),
-                    row(1, 1, 2, 0)
+                                    row(0, 1, 0, 0),
+                                    row(0, 1, 1, 0),
+                                    row(1, 1, 0, 1),
+                                    row(1, 1, 1, 0),
+                                    row(1, 1, 2, 0)
             );
 
             // delete rows that don't match the filter
@@ -944,27 +944,27 @@ public class ViewFilteringTest extends CQLTester
             execute("DELETE FROM %s WHERE a = ? AND b = ? AND c = ?", 2, 0, 0);
             execute("DELETE FROM %s WHERE a = ? AND b = ?", 0, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 1, 0, 0),
-                    row(0, 1, 1, 0),
-                    row(1, 1, 0, 1),
-                    row(1, 1, 1, 0),
-                    row(1, 1, 2, 0)
+                                    row(0, 1, 0, 0),
+                                    row(0, 1, 1, 0),
+                                    row(1, 1, 0, 1),
+                                    row(1, 1, 1, 0),
+                                    row(1, 1, 2, 0)
             );
 
             // delete a row that does match the filter
             execute("DELETE FROM %s WHERE a = ? AND b = ? AND c = ?", 1, 1, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 1, 0, 0),
-                    row(0, 1, 1, 0),
-                    row(1, 1, 1, 0),
-                    row(1, 1, 2, 0)
+                                    row(0, 1, 0, 0),
+                                    row(0, 1, 1, 0),
+                                    row(1, 1, 1, 0),
+                                    row(1, 1, 2, 0)
             );
 
             // delete a partition that matches the filter
             execute("DELETE FROM %s WHERE a = ?", 1);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 1, 0, 0),
-                    row(0, 1, 1, 0)
+                                    row(0, 1, 0, 0),
+                                    row(0, 1, 1, 0)
             );
 
             dropView("mv_test" + i);
@@ -1002,51 +1002,51 @@ public class ViewFilteringTest extends CQLTester
                 Thread.sleep(10);
 
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 0, 1, 0),
-                    row(0, 1, 1, 0),
-                    row(1, 0, 1, 0),
-                    row(1, 1, 1, 0)
+                                    row(0, 0, 1, 0),
+                                    row(0, 1, 1, 0),
+                                    row(1, 0, 1, 0),
+                                    row(1, 1, 1, 0)
             );
 
             // insert new rows that do not match the filter
             execute("INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?)", 2, 0, 0, 0);
             execute("INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?)", 2, 1, -1, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 0, 1, 0),
-                    row(0, 1, 1, 0),
-                    row(1, 0, 1, 0),
-                    row(1, 1, 1, 0)
+                                    row(0, 0, 1, 0),
+                                    row(0, 1, 1, 0),
+                                    row(1, 0, 1, 0),
+                                    row(1, 1, 1, 0)
             );
 
             // insert new row that does match the filter
             execute("INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?)", 1, 2, 1, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 0, 1, 0),
-                    row(0, 1, 1, 0),
-                    row(1, 0, 1, 0),
-                    row(1, 1, 1, 0),
-                    row(1, 2, 1, 0)
+                                    row(0, 0, 1, 0),
+                                    row(0, 1, 1, 0),
+                                    row(1, 0, 1, 0),
+                                    row(1, 1, 1, 0),
+                                    row(1, 2, 1, 0)
             );
 
             // update rows that don't match the filter
             execute("UPDATE %s SET d = ? WHERE a = ? AND b = ? AND c = ?", 1, 1, -1, 0);
             execute("UPDATE %s SET d = ? WHERE a = ? AND b = ? AND c = ?", 1, 2, 0, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 0, 1, 0),
-                    row(0, 1, 1, 0),
-                    row(1, 0, 1, 0),
-                    row(1, 1, 1, 0),
-                    row(1, 2, 1, 0)
+                                    row(0, 0, 1, 0),
+                                    row(0, 1, 1, 0),
+                                    row(1, 0, 1, 0),
+                                    row(1, 1, 1, 0),
+                                    row(1, 2, 1, 0)
             );
 
             // update a row that does match the filter
             execute("UPDATE %s SET d = ? WHERE a = ? AND b = ? AND c = ?", 2, 1, 1, 1);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 0, 1, 0),
-                    row(0, 1, 1, 0),
-                    row(1, 0, 1, 0),
-                    row(1, 1, 1, 2),
-                    row(1, 2, 1, 0)
+                                    row(0, 0, 1, 0),
+                                    row(0, 1, 1, 0),
+                                    row(1, 0, 1, 0),
+                                    row(1, 1, 1, 2),
+                                    row(1, 2, 1, 0)
             );
 
             // delete rows that don't match the filter
@@ -1055,27 +1055,27 @@ public class ViewFilteringTest extends CQLTester
             execute("DELETE FROM %s WHERE a = ? AND b = ? AND c = ?", 2, 0, 0);
             execute("DELETE FROM %s WHERE a = ? AND b = ?", 0, -1);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 0, 1, 0),
-                    row(0, 1, 1, 0),
-                    row(1, 0, 1, 0),
-                    row(1, 1, 1, 2),
-                    row(1, 2, 1, 0)
+                                    row(0, 0, 1, 0),
+                                    row(0, 1, 1, 0),
+                                    row(1, 0, 1, 0),
+                                    row(1, 1, 1, 2),
+                                    row(1, 2, 1, 0)
             );
 
             // delete a row that does match the filter
             execute("DELETE FROM %s WHERE a = ? AND b = ? AND c = ?", 1, 1, 1);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 0, 1, 0),
-                    row(0, 1, 1, 0),
-                    row(1, 0, 1, 0),
-                    row(1, 2, 1, 0)
+                                    row(0, 0, 1, 0),
+                                    row(0, 1, 1, 0),
+                                    row(1, 0, 1, 0),
+                                    row(1, 2, 1, 0)
             );
 
             // delete a partition that matches the filter
             execute("DELETE FROM %s WHERE a = ?", 1);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 0, 1, 0),
-                    row(0, 1, 1, 0)
+                                    row(0, 0, 1, 0),
+                                    row(0, 1, 1, 0)
             );
 
             // insert a partition with one matching and one non-matching row using a batch (CASSANDRA-10614)
@@ -1087,9 +1087,9 @@ public class ViewFilteringTest extends CQLTester
                     4, 4, 0, 0,
                     4, 4, 1, 1);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(0, 0, 1, 0),
-                    row(0, 1, 1, 0),
-                    row(4, 4, 1, 1)
+                                    row(0, 0, 1, 0),
+                                    row(0, 1, 1, 0),
+                                    row(4, 4, 1, 1)
             );
 
             dropView("mv_test" + i);
@@ -1127,41 +1127,41 @@ public class ViewFilteringTest extends CQLTester
                 Thread.sleep(10);
 
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(1, 0, 1, 0),
-                    row(1, 1, 1, 0)
+                                    row(1, 0, 1, 0),
+                                    row(1, 1, 1, 0)
             );
 
             // insert new rows that do not match the filter
             execute("INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?)", 0, 0, 1, 0);
             execute("INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?)", 1, 1, 0, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(1, 0, 1, 0),
-                    row(1, 1, 1, 0)
+                                    row(1, 0, 1, 0),
+                                    row(1, 1, 1, 0)
             );
 
             // insert new row that does match the filter
             execute("INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?)", 1, 2, 1, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(1, 0, 1, 0),
-                    row(1, 1, 1, 0),
-                    row(1, 2, 1, 0)
+                                    row(1, 0, 1, 0),
+                                    row(1, 1, 1, 0),
+                                    row(1, 2, 1, 0)
             );
 
             // update rows that don't match the filter
             execute("UPDATE %s SET d = ? WHERE a = ? AND b = ? AND c = ?", 1, 1, -1, 0);
             execute("UPDATE %s SET d = ? WHERE a = ? AND b = ? AND c = ?", 0, 1, 1, 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(1, 0, 1, 0),
-                    row(1, 1, 1, 0),
-                    row(1, 2, 1, 0)
+                                    row(1, 0, 1, 0),
+                                    row(1, 1, 1, 0),
+                                    row(1, 2, 1, 0)
             );
 
             // update a row that does match the filter
             execute("UPDATE %s SET d = ? WHERE a = ? AND b = ? AND c = ?", 2, 1, 1, 1);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(1, 0, 1, 0),
-                    row(1, 1, 1, 2),
-                    row(1, 2, 1, 0)
+                                    row(1, 0, 1, 0),
+                                    row(1, 1, 1, 2),
+                                    row(1, 2, 1, 0)
             );
 
             // delete rows that don't match the filter
@@ -1169,16 +1169,16 @@ public class ViewFilteringTest extends CQLTester
             execute("DELETE FROM %s WHERE a = ? AND b = ? AND c = ?", 2, 0, 1);
             execute("DELETE FROM %s WHERE a = ?", 0);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(1, 0, 1, 0),
-                    row(1, 1, 1, 2),
-                    row(1, 2, 1, 0)
+                                    row(1, 0, 1, 0),
+                                    row(1, 1, 1, 2),
+                                    row(1, 2, 1, 0)
             );
 
             // delete a row that does match the filter
             execute("DELETE FROM %s WHERE a = ? AND b = ? AND c = ?", 1, 1, 1);
             assertRowsIgnoringOrder(execute("SELECT a, b, c, d FROM mv_test" + i),
-                    row(1, 0, 1, 0),
-                    row(1, 2, 1, 0)
+                                    row(1, 0, 1, 0),
+                                    row(1, 2, 1, 0)
             );
 
             // delete a partition that matches the filter
@@ -1218,61 +1218,61 @@ public class ViewFilteringTest extends CQLTester
                              "udtval";
 
         createTable(
-                "CREATE TABLE %s (" +
-                        "asciival ascii, " +
-                        "bigintval bigint, " +
-                        "blobval blob, " +
-                        "booleanval boolean, " +
-                        "dateval date, " +
-                        "decimalval decimal, " +
-                        "doubleval double, " +
-                        "floatval float, " +
-                        "inetval inet, " +
-                        "intval int, " +
-                        "textval text, " +
-                        "timeval time, " +
-                        "timestampval timestamp, " +
-                        "timeuuidval timeuuid, " +
-                        "uuidval uuid," +
-                        "varcharval varchar, " +
-                        "varintval varint, " +
-                        "frozenlistval frozen<list<int>>, " +
-                        "frozensetval frozen<set<uuid>>, " +
-                        "frozenmapval frozen<map<ascii, int>>," +
-                        "tupleval frozen<tuple<int, ascii, uuid>>," +
-                        "udtval frozen<" + myType + ">, " +
-                        "PRIMARY KEY (" + columnNames + "))");
+                    "CREATE TABLE %s (" +
+                            "asciival ascii, " +
+                            "bigintval bigint, " +
+                            "blobval blob, " +
+                            "booleanval boolean, " +
+                            "dateval date, " +
+                            "decimalval decimal, " +
+                            "doubleval double, " +
+                            "floatval float, " +
+                            "inetval inet, " +
+                            "intval int, " +
+                            "textval text, " +
+                            "timeval time, " +
+                            "timestampval timestamp, " +
+                            "timeuuidval timeuuid, " +
+                            "uuidval uuid," +
+                            "varcharval varchar, " +
+                            "varintval varint, " +
+                            "frozenlistval frozen<list<int>>, " +
+                            "frozensetval frozen<set<uuid>>, " +
+                            "frozenmapval frozen<map<ascii, int>>," +
+                            "tupleval frozen<tuple<int, ascii, uuid>>," +
+                            "udtval frozen<" + myType + ">, " +
+                            "PRIMARY KEY (" + columnNames + "))");
 
         execute("USE " + keyspace());
         executeNet(protocolVersion, "USE " + keyspace());
 
 
         createView(
-                "mv_test",
-                "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE " +
-                        "asciival = 'abc' AND " +
-                        "bigintval = 123 AND " +
-                        "blobval = 0xfeed AND " +
-                        "booleanval = true AND " +
-                        "dateval = '1987-03-23' AND " +
-                        "decimalval = 123.123 AND " +
-                        "doubleval = 123.123 AND " +
-                        "floatval = 123.123 AND " +
-                        "inetval = '127.0.0.1' AND " +
-                        "intval = 123 AND " +
-                        "textval = 'abc' AND " +
-                        "timeval = '07:35:07.000111222' AND " +
-                        "timestampval = 123123123 AND " +
-                        "timeuuidval = 6BDDC89A-5644-11E4-97FC-56847AFE9799 AND " +
-                        "uuidval = 6BDDC89A-5644-11E4-97FC-56847AFE9799 AND " +
-                        "varcharval = 'abc' AND " +
-                        "varintval = 123123123 AND " +
-                        "frozenlistval = [1, 2, 3] AND " +
-                        "frozensetval = {6BDDC89A-5644-11E4-97FC-56847AFE9799} AND " +
-                        "frozenmapval = {'a': 1, 'b': 2} AND " +
-                        "tupleval = (1, 'foobar', 6BDDC89A-5644-11E4-97FC-56847AFE9799) AND " +
-                        "udtval = {a: 1, b: 6BDDC89A-5644-11E4-97FC-56847AFE9799, c: {'foo', 'bar'}} " +
-                        "PRIMARY KEY (" + columnNames + ")");
+                   "mv_test",
+                   "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE " +
+                           "asciival = 'abc' AND " +
+                           "bigintval = 123 AND " +
+                           "blobval = 0xfeed AND " +
+                           "booleanval = true AND " +
+                           "dateval = '1987-03-23' AND " +
+                           "decimalval = 123.123 AND " +
+                           "doubleval = 123.123 AND " +
+                           "floatval = 123.123 AND " +
+                           "inetval = '127.0.0.1' AND " +
+                           "intval = 123 AND " +
+                           "textval = 'abc' AND " +
+                           "timeval = '07:35:07.000111222' AND " +
+                           "timestampval = 123123123 AND " +
+                           "timeuuidval = 6BDDC89A-5644-11E4-97FC-56847AFE9799 AND " +
+                           "uuidval = 6BDDC89A-5644-11E4-97FC-56847AFE9799 AND " +
+                           "varcharval = 'abc' AND " +
+                           "varintval = 123123123 AND " +
+                           "frozenlistval = [1, 2, 3] AND " +
+                           "frozensetval = {6BDDC89A-5644-11E4-97FC-56847AFE9799} AND " +
+                           "frozenmapval = {'a': 1, 'b': 2} AND " +
+                           "tupleval = (1, 'foobar', 6BDDC89A-5644-11E4-97FC-56847AFE9799) AND " +
+                           "udtval = {a: 1, b: 6BDDC89A-5644-11E4-97FC-56847AFE9799, c: {'foo', 'bar'}} " +
+                           "PRIMARY KEY (" + columnNames + ")");
 
         execute("INSERT INTO %s (" + columnNames + ") VALUES (" +
                 "'abc'," +

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1b36740e/test/unit/org/apache/cassandra/cql3/ViewTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/cql3/ViewTest.java b/test/unit/org/apache/cassandra/cql3/ViewTest.java
index f8f8c9f..61f4b4a 100644
--- a/test/unit/org/apache/cassandra/cql3/ViewTest.java
+++ b/test/unit/org/apache/cassandra/cql3/ViewTest.java
@@ -18,12 +18,13 @@
 
 package org.apache.cassandra.cql3;
 
+import static org.junit.Assert.*;
+
 import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
 import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
-
 import com.google.common.util.concurrent.Uninterruptibles;
 
 import junit.framework.Assert;
@@ -46,8 +47,6 @@ import org.apache.cassandra.db.SystemKeyspace;
 import org.apache.cassandra.db.compaction.CompactionManager;
 import org.apache.cassandra.utils.FBUtilities;
 
-import static org.junit.Assert.assertTrue;
-
 public class ViewTest extends CQLTester
 {
     int protocolVersion = 4;
@@ -83,7 +82,7 @@ public class ViewTest extends CQLTester
     {
         executeNet(protocolVersion, query, params);
         while (!(((SEPExecutor) StageManager.getStage(Stage.VIEW_MUTATION)).getPendingTasks() == 0
-                 && ((SEPExecutor) StageManager.getStage(Stage.VIEW_MUTATION)).getActiveCount() == 0))
+                && ((SEPExecutor) StageManager.getStage(Stage.VIEW_MUTATION)).getActiveCount() == 0))
         {
             Thread.sleep(1);
         }
@@ -342,9 +341,9 @@ public class ViewTest extends CQLTester
     public void testCreateMvWithTTL() throws Throwable
     {
         createTable("CREATE TABLE %s (" +
-                "k int PRIMARY KEY, " +
-                "c int, " +
-                "val int) WITH default_time_to_live = 60");
+                    "k int PRIMARY KEY, " +
+                    "c int, " +
+                    "val int) WITH default_time_to_live = 60");
 
         execute("USE " + keyspace());
         executeNet(protocolVersion, "USE " + keyspace());
@@ -421,8 +420,10 @@ public class ViewTest extends CQLTester
         if (flush)
             FBUtilities.waitOnFutures(ks.flush());
 
-            //change c's value and TS=3, tombstones c=1 and adds c=0 record
+        // change c's value and TS=3, tombstones c=1 and adds c=0 record
         executeNet(protocolVersion, "UPDATE %s USING TIMESTAMP 3 SET c = ? WHERE a = ? and b = ? ", 0, 0, 0);
+        if (flush)
+            FBUtilities.waitOnFutures(ks.flush());
         assertRows(execute("SELECT d from mv WHERE c = ? and a = ? and b = ?", 1, 0, 0));
 
         if(flush)
@@ -443,7 +444,7 @@ public class ViewTest extends CQLTester
         assertRows(execute("SELECT d,e from mv WHERE c = ? and a = ? and b = ?", 1, 0, 0), row(0, null));
 
 
-            //Add e value @ TS=1
+        //Add e value @ TS=1
         executeNet(protocolVersion, "UPDATE %s USING TIMESTAMP 1 SET e = ? WHERE a = ? and b = ? ", 1, 0, 0);
         assertRows(execute("SELECT d,e from mv WHERE c = ? and a = ? and b = ?", 1, 0, 0), row(0, 1));
 
@@ -838,12 +839,12 @@ public class ViewTest extends CQLTester
         String table = KEYSPACE + "." + currentTable();
         updateView("BEGIN BATCH " +
                 "INSERT INTO " + table + " (a, b, c, d) VALUES (?, ?, ?, ?); " + // should be accepted
-                "UPDATE " + table + " SET d = ? WHERE a = ? AND b = ?; " +  // should be ignored
+                "UPDATE " + table + " SET d = ? WHERE a = ? AND b = ?; " +  // should be accepted
                 "APPLY BATCH",
                 0, 0, 0, 0,
                 1, 0, 1);
         assertRows(execute("SELECT a, b, c from mv WHERE b = ?", 0), row(0, 0, 0));
-        assertEmpty(execute("SELECT a, b, c from mv WHERE b = ?", 1));
+        assertRows(execute("SELECT a, b, c from mv WHERE b = ?", 1), row(0, 1, null));
 
         ColumnFamilyStore cfs = Keyspace.open(keyspace()).getColumnFamilyStore("mv");
         cfs.forceBlockingFlush();
@@ -1005,9 +1006,9 @@ public class ViewTest extends CQLTester
                       row(1, 3));
 
         updateView(String.format("BEGIN UNLOGGED BATCH " +
-                   "DELETE FROM %s WHERE a = 1 AND b > 1 AND b < 3;" +
-                   "DELETE FROM %s WHERE a = 1;" +
-                   "APPLY BATCH", currentTable(), currentTable()));
+                                 "DELETE FROM %s WHERE a = 1 AND b > 1 AND b < 3;" +
+                                 "DELETE FROM %s WHERE a = 1;" +
+                                 "APPLY BATCH", currentTable(), currentTable()));
 
         mvRows = executeNet(protocolVersion, "SELECT a, b FROM mv1");
         assertRowsNet(protocolVersion, mvRows);
@@ -1295,4 +1296,4 @@ public class ViewTest extends CQLTester
         assertRows(execute("SELECT k, toJson(listval) from mv"),
                    row(0, "[[\"a\", \"1\"], [\"b\", \"2\"], [\"c\", \"3\"]]"));
     }
-}
+}
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


Mime
View raw message