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

Sylvain Lebresne commented on CASSANDRA-11602:
----------------------------------------------

I completely agree that we shouldn't accept that create MV statement and 
silently ignore the static column, and that's certainly an oversight, but I 
also don't think we have a good way to handle static column in MVs.

That is, if we were to include them, each MV entry would have to ship with its 
own copy of the static value and so any update that modify a static column 
would have to read the whole partition to figure out all the corresponding MV 
entries and modify them. Which would be so inefficient that I can't really see 
much case where that would be useful. But on the other, I do easily see how 
that inefficiency could easily suprise/bite users. So unless/until someone has 
a smarter idea on how to handle static columns, I think we should just reject 
create statement for MV that would include them.


> Materialized View Doest Not Have Static Columns
> -----------------------------------------------
>
>                 Key: CASSANDRA-11602
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11602
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Ravishankar Rajendran
>
> {quote}
> CREATE TABLE "team" (teamname text, manager text, location text static, 
> PRIMARY KEY ((teamname), manager));
> INSERT INTO team (teamname, manager, location) VALUES ('Red Bull1', 
> 'Ricciardo11', 'Australian');
> INSERT INTO team (teamname, manager, location) VALUES ('Red Bull2', 
> 'Ricciardo12', 'Australian');
> INSERT INTO team (teamname, manager, location) VALUES ('Red Bull2', 
> 'Ricciardo13', 'Australian');
> select * From team;
> CREATE MATERIALIZED VIEW IF NOT EXISTS "teamMV" AS SELECT "teamname", 
> "manager", "location" FROM "team" WHERE "teamname" IS NOT NULL AND "manager" 
> is NOT NULL AND "location" is NOT NULL PRIMARY KEY("manager", "teamname");  
> select * from "teamMV";
> {quote}
> The teamMV does not have "location" column. Static columns are not getting 
> created in MV.



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

Reply via email to