all-things-risingwave
Is there a mechanism to alter a few columns in an existing materialized view without recomputing all other data?
Is there a way to modify specific columns in a materialized view without reprocessing all the data? The ALTER command doesn't seem to support this. Any suggestions for workarounds for a rapidly changing schema?
Is
Isaac Pohl-Zaretsky
Asked on Sep 13, 2022
- Currently, there is no direct ALTER command to modify specific columns in a materialized view without recomputing all other data.
- One workaround could be to consider using nested types like struct, or creating new materialized views and dropping the old ones.
- Adding or dropping columns in materialized views involves complex changes in internal streaming states, so careful design is necessary before implementing such features.
- Creating multiple materialized views per column could be an approach, but it may lead to a large number of tables. However, there are no scaling issues or overhead concerns with the number of tables, as they are treated as a whole in the system.
- There is a plan to support the jsonb type, which would allow specifying nested columns as jsonb without requiring a concrete type or schema.
Sep 14, 2022Edited by