Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Not A Problem
-
None
-
[cqlsh 5.0.1 | Cassandra 3.11.1 | CQL spec 3.4.4 | Native protocol v4]
-
Normal
Description
After upgrading from 3.11.0 to 3.11.1 I cannot define materialized views restricted on non primary key columns.
I get: InvalidRequest: Error from server: code=2200 [Invalid query] message="Non-primary key columns cannot be restricted in the SELECT statement used for materialized view creation (got restrictions on: d_destination_set)"
In my 3.11.0 cluster:
$ cqlsh ******
Connected to Test Cluster at ********:9042.
[cqlsh 5.0.1 | Cassandra 3.11.0 | CQL spec 3.4.4 | Native protocol v4]
Use HELP for help.
cqlsh> CREATE TABLE phoenix.test_table (
... datetime_bucket ascii primary key,
... d_destination_set boolean,
... d_destination_timestamp timestamp
... );
cqlsh> CREATE MATERIALIZED VIEW phoenix.test_view AS
... SELECT datetime_bucket,
... d_destination_set
... FROM phoenix.test_table
... WHERE datetime_bucket IS NOT NULL
... AND d_destination_set = FALSE
... PRIMARY KEY (datetime_bucket, d_destination_set);
cqlsh>
No errors shown here.
In my 3.11.1 cluster:
cqlsh> CREATE TABLE phoenix.test_table (
... datetime_bucket ascii primary key,
... d_destination_set boolean,
... d_destination_timestamp timestamp
... );
cqlsh> CREATE MATERIALIZED VIEW phoenix.test_view AS
... SELECT datetime_bucket,
... d_destination_set
... FROM phoenix.test_table
... WHERE datetime_bucket IS NOT NULL
... AND d_destination_set = FALSE
... PRIMARY KEY (datetime_bucket, d_destination_set);
InvalidRequest: Error from server: code=2200 [Invalid query] message="Non-primary key columns cannot be restricted in the SELECT statement used for materialized view creation (got restrictions on: d_destination_set)"
Attachments
Issue Links
- is related to
-
CASSANDRA-13798 Disallow filtering on non-primary-key base column for MV
- Resolved