[ 
https://issues.apache.org/jira/browse/CASSANDRA-6477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14627156#comment-14627156
 ] 

Jonathan Ellis commented on CASSANDRA-6477:
-------------------------------------------

bq. It needs to be supported that rows are ignored in the view if their column 
values would lead to null values in the primary key of the view. Otherwise, 
view maintenance becomes impractical for sparsely populated tables.

This is easily supported syntactically without special directives:

{code}
CREATE MATERIALIZED VIEW users_by_ssn AS
SELECT ...
FROM users
WHERE ssn IS NOT NULL
PRIMARY KEY (ssn, user_id)
{code}

Support for WHERE clause in MV is on the roadmap.

> Materialized Views (was: Global Indexes)
> ----------------------------------------
>
>                 Key: CASSANDRA-6477
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6477
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Carl Yeksigian
>              Labels: cql
>             Fix For: 3.0 beta 1
>
>         Attachments: test-view-data.sh, users.yaml
>
>
> Local indexes are suitable for low-cardinality data, where spreading the 
> index across the cluster is a Good Thing.  However, for high-cardinality 
> data, local indexes require querying most nodes in the cluster even if only a 
> handful of rows is returned.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to