-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support materialized views [DATACASS-383] #550
Comments
Andrew commented To speed up the process, just wanted to suggest an example of what we implemented in our project. Define additional views on table entities: @Table("user")
@MaterializedViews({
@MaterializedView(name="user_by_email", primaryKeyColumns = {
@PrimaryKeyColumn(value = "email", type = PrimaryKeyType.PARTITIONED),
@PrimaryKeyColumn(value = "id")
})
}) Use a query: @Table("user")
@MaterializedViews({
@MaterializedView(name="user_by_email",
query="SELECT * FROM user WHERE email IS NOT NULL AND id IS NOT NULL",
primaryKeyColumns = {
@PrimaryKeyColumn(value = "email", type = PrimaryKeyType.PARTITIONED),
@PrimaryKeyColumn(value = "id")
})
}) Plus added schema specs and generation/drop extending |
Kamil commented Guys, are there any plans to support it? |
Mark Paluch commented It makes sense to start out with CQL generation and view descriptors in the first place. I'm not entirely sold on annotation-based schema creation. The query part allows more than just Using views requires our |
Nate McCall commented We have retro-actively marked Materialized Views as experimental. In order to keep users from hitting any of the (numerous) issues, I am asking that you avoid creating any implementations here until we can iron out the functionality. |
Mark Paluch commented Thanks for the heads up |
Mark Paluch opened DATACASS-383 and commented
See http://www.datastax.com/dev/blog/new-in-cassandra-3-0-materialized-views
5 votes, 9 watchers
The text was updated successfully, but these errors were encountered: