phoenix
phoenix copied to clipboard
PHOENIX-4555 Only mark view as updatable if rows cannot overlap with other updatable views
Jira: PHOENIX-4555
Restrict view to be UPDATABLE if the view specification:
- uses only the PK columns
- starts from the first PK column if the parent table is not multi tenant; otherwise, starts from the second PK column (the first column will be TENANT_ID)
- PK columns should be in the order they are defined
- uses the same set of PK columns as its sibling views' specification
Otherwise, mark the view as READ_ONLY.