Aren't Materialized Views supposed to provide a Read-optimizing layer over top of the ALLOW FILTERING mechanism? Because the following seems like it fits the Cassandra criteria, but I'm getting exceptions complaining that an update statement is affecting a Primary Key, which should only be on tables, not Mat Views.
I've made a table with a 1-column Primary Key
cqlSession.execute(createTable(NAME).ifNotExists() .withPartitionKey(PKEY, DataTypes.TEXT) .withColumn(C1, DataTypes.TEXT) .withColumn(C2, DataTypes.TEXT) .withColumn(C3, DataTypes.TEXT) .build());
cqlSession.execute(createMaterializedView(MAT_NAME).ifNotExists() .selectFrom(NAME) .columns(PKEY, C1, C2, C3) .whereColumn(PKEY).isNotNull() .whereColumn(C1).isNotNull() .withPartitionKey(PKEY) .withClusteringColumn(C1) .build());
PreparedStatement ps = session.prepare( update(NAME).setColumn(C2, QueryBuilder.bindMarker()) .whereColumn(C1).isEqualTo(QueryBuilder.bindMarker()) .whereColumn(C2).isEqualTo(QueryBuilder.bindMarker()) .ifExists() .build());
"ps" is throwing the exception. By my reading of the Cassandra Driver Spec, this is incorrect. Can someone point shed some light on this?
Java driver 4.11.0
native protocol 1.5.0
datastax cassandra version 4.1.10