cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chema Vinacua (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CASSANDRA-13956) Cannot restrict columns on materialized view
Date Mon, 16 Oct 2017 07:34:00 GMT
Chema Vinacua created CASSANDRA-13956:
-----------------------------------------

             Summary: Cannot restrict columns on materialized view
                 Key: CASSANDRA-13956
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-13956
             Project: Cassandra
          Issue Type: Bug
          Components: Materialized Views
         Environment: [cqlsh 5.0.1 | Cassandra 3.11.1 | CQL spec 3.4.4 | Native protocol v4]
            Reporter: Chema Vinacua
             Fix For: 3.11.1


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)"





--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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


Mime
View raw message