[jira] [Commented] (CASSANDRA-11602) Materialized View Doest Not Have Static Columns
[ https://issues.apache.org/jira/browse/CASSANDRA-11602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15266727#comment-15266727 ] Ravishankar Rajendran commented on CASSANDRA-11602: --- Really? Is Sarcasm the only response you had? Cant customers find and report design faults? Or is it only allowed to code contributors? Anyway, now that I know there is not going to be any rational arguments in the conversation, I am choosing to quit. Thanks. > 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 >Assignee: Carl Yeksigian > Fix For: 3.0.x, 3.x > > > {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)
[jira] [Commented] (CASSANDRA-11602) Materialized View Doest Not Have Static Columns
[ https://issues.apache.org/jira/browse/CASSANDRA-11602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15266656#comment-15266656 ] Sylvain Lebresne commented on CASSANDRA-11602: -- Sure. We'll be eagerly waiting on your better and not fundamentally wrong design. In the meantime though, let's start by using this ticket to fix the validation. > 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 >Assignee: Carl Yeksigian > Fix For: 3.0.x, 3.x > > > {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)
[jira] [Commented] (CASSANDRA-11602) Materialized View Doest Not Have Static Columns
[ https://issues.apache.org/jira/browse/CASSANDRA-11602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15266650#comment-15266650 ] Ravishankar Rajendran commented on CASSANDRA-11602: --- I do not recommend having anything inefficient. My claim is that, if it is inefficient, then there is something fundamentally wrong in the design. We cannot keep building on deaign that does not help create efficient code. > 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 >Assignee: Carl Yeksigian > Fix For: 3.0.x, 3.x > > > {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)
[jira] [Commented] (CASSANDRA-11602) Materialized View Doest Not Have Static Columns
[ https://issues.apache.org/jira/browse/CASSANDRA-11602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15266251#comment-15266251 ] Sylvain Lebresne commented on CASSANDRA-11602: -- bq. Any response? We appreciate your input, but as we said, we have currently no way to implement this in a non _very_ inefficient way, and our experience is that something that inefficient deserves C* more that it helps because no-one will end up using it due to the awful performance but people will get burnt by it first. If you disagree or have some idea on how to make this efficient, you are welcome to provide a patch as well as sufficient benchmark evidence that it performs acceptably. > 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 >Assignee: Carl Yeksigian > Fix For: 3.0.x, 3.x > > > {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)
[jira] [Commented] (CASSANDRA-11602) Materialized View Doest Not Have Static Columns
[ https://issues.apache.org/jira/browse/CASSANDRA-11602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15266249#comment-15266249 ] Sylvain Lebresne commented on CASSANDRA-11602: -- Fix lgtm, +1, but on commit I'd pull out some {noformat} boolean includeDef = included.isEmpty() || included.contains(identifier); {noformat} since that test is used twice in a row and the variable name will act as additional documentation I feel. > 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 >Assignee: Carl Yeksigian > Fix For: 3.0.x, 3.x > > > {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)
[jira] [Commented] (CASSANDRA-11602) Materialized View Doest Not Have Static Columns
[ https://issues.apache.org/jira/browse/CASSANDRA-11602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15265585#comment-15265585 ] Ravishankar Rajendran commented on CASSANDRA-11602: --- Any response? -Ravi > 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 >Assignee: Carl Yeksigian > Fix For: 3.0.x, 3.x > > > {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)
[jira] [Commented] (CASSANDRA-11602) Materialized View Doest Not Have Static Columns
[ https://issues.apache.org/jira/browse/CASSANDRA-11602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15264260#comment-15264260 ] Ravishankar Rajendran commented on CASSANDRA-11602: --- Guys, Denormalization and Static Columns are the backbone of Cassandra Data Model. If you cannot do static columns in MV, that means there is something fundamentally wrong in the base design. With Static Columns an application gets an option to run one UPDATE CQL instead of a million UPDATE CQL. The fundamental requirement of an MV is denormalization, which must include static columns too. By handicapping application developers get the right thing, we are only driving away people from using Cassandra. By the way "the new comer" wont be scary. He will be happy that finally MV does what it really promises. -Ravi > 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 >Assignee: Carl Yeksigian > Fix For: 3.0.x, 3.x > > > {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)
[jira] [Commented] (CASSANDRA-11602) Materialized View Doest Not Have Static Columns
[ https://issues.apache.org/jira/browse/CASSANDRA-11602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15264137#comment-15264137 ] Carl Yeksigian commented on CASSANDRA-11602: Good point; I'll update the ticket to exclude those as well. > 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 >Assignee: Carl Yeksigian > Fix For: 3.0.x, 3.x > > > {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)
[jira] [Commented] (CASSANDRA-11602) Materialized View Doest Not Have Static Columns
[ https://issues.apache.org/jira/browse/CASSANDRA-11602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15264120#comment-15264120 ] Sylvain Lebresne commented on CASSANDRA-11602: -- bq. and to warn if it is dropped when using a {{SELECT *}} I'd actually be in favor of rejecting that too. First because silently ignoring columns is bound to surprise/confuse user, and this whether users gets the warning or not. If they don't get it it's confusing, but if they get it, it's a bit scary for new comer as they won't know if they are doing something wrong or not. Second, because if we ever do find a way to include static columns, we'd have a breaking change here since user would have been used to them being ignored. And third, because the only argument for allowing that is the minor convenience of not having to list columns manually, but if you do so you're getting a client warning which is annoying/distracting, so you'll kind of end up listing columns manually anyway. > 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 >Assignee: Carl Yeksigian > Fix For: 3.0.x, 3.x > > > {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)
[jira] [Commented] (CASSANDRA-11602) Materialized View Doest Not Have Static Columns
[ https://issues.apache.org/jira/browse/CASSANDRA-11602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15256383#comment-15256383 ] Ravishankar Rajendran commented on CASSANDRA-11602: --- Hi [~carlyeks], any updates on this? Whats the plan? > 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 >Assignee: Carl Yeksigian > > {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)
[jira] [Commented] (CASSANDRA-11602) Materialized View Doest Not Have Static Columns
[ https://issues.apache.org/jira/browse/CASSANDRA-11602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15248086#comment-15248086 ] giridhar muralibabu commented on CASSANDRA-11602: - Adding static columns in MVs will help developers to maximum use of materialized views > 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 >Assignee: Carl Yeksigian > > {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)
[jira] [Commented] (CASSANDRA-11602) Materialized View Doest Not Have Static Columns
[ https://issues.apache.org/jira/browse/CASSANDRA-11602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15248002#comment-15248002 ] Ravishankar Rajendran commented on CASSANDRA-11602: --- [~slebresne] Logically all tables in C* are materialized views .i.e. tables cannot have foreign keys and are modeled based on queries. That is what is a View in RDBMS world. All that the C* MVs do is; it automates denormalization. Essentially MVs in C* must be similar to tables in all behaviors. MVs in C* must be nothing but tables that can automate denormalization. MVs must solve for static columns. MVs with no support to static column will be very disappointing for developers. Static columns are a boon for developers and performance engineers. Static columns + MV is like a holy grail. We must add support for static columns in MV. > 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 >Assignee: Carl Yeksigian > > {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)
[jira] [Commented] (CASSANDRA-11602) Materialized View Doest Not Have Static Columns
[ https://issues.apache.org/jira/browse/CASSANDRA-11602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)