forked from MaterializeInc/materialize
-
Notifications
You must be signed in to change notification settings - Fork 0
/
alter.slt
86 lines (63 loc) · 2.56 KB
/
alter.slt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Copyright Materialize, Inc. and contributors. All rights reserved.
#
# Use of this software is governed by the Business Source License
# included in the LICENSE file at the root of this repository.
#
# As of the Change Date specified in that file, in accordance with
# the Business Source License, use of this software will be governed
# by the Apache License, Version 2.0.
mode cockroach
simple conn=mz_system,user=mz_system
ALTER SYSTEM SET enable_connection_validation_syntax TO true;
----
COMPLETE 0
simple conn=mz_system,user=mz_system
ALTER SYSTEM SET enable_rbac_checks TO false;
----
COMPLETE 0
query error system schema 'mz_catalog' cannot be modified
ALTER TABLE mz_tables RENAME TO foo;
query error system schema 'mz_internal' cannot be modified
ALTER SOURCE mz_internal.mz_storage_shards RENAME TO foo;
query error cannot ALTER this type of source
ALTER SOURCE mz_internal.mz_storage_shards RESET (size);
statement ok
CREATE CONNECTION c TO KAFKA (BROKER 'localhost:9092') WITH (VALIDATE = false);
query TT
SHOW CONNECTIONS
----
c kafka
statement ok
ALTER CONNECTION c RENAME TO d;
query TT
SHOW CONNECTIONS
----
d kafka
statement ok
CREATE CLUSTER other_cluster SIZE '1', REPLICATION FACTOR 0
query error db error: ERROR: ALTER \.\.\. SET CLUSTER syntax is not supported
ALTER MATERIALIZED VIEW does_not_exist SET CLUSTER default
query error db error: ERROR: ALTER \.\.\. SET CLUSTER syntax is not supported
ALTER SOURCE does_not_exist SET CLUSTER default
query error db error: ERROR: ALTER \.\.\. SET CLUSTER syntax is not supported
ALTER SINK does_not_exist SET CLUSTER default
simple conn=mz_system,user=mz_system
ALTER SYSTEM SET enable_alter_set_cluster = on;
----
COMPLETE 0
statement ok
CREATE VIEW v AS SELECT 1
statement ok
CREATE MATERIALIZED VIEW mv AS SELECT 1
statement ok
ALTER MATERIALIZED VIEW mv SET CLUSTER default
query error db error: ERROR: unknown cluster 'does_not_exist'
ALTER MATERIALIZED VIEW mv SET CLUSTER does_not_exist
query error db error: ERROR: ALTER SET CLUSTER are not supported
ALTER MATERIALIZED VIEW mv SET CLUSTER other_cluster
query error db error: ERROR: ALTER VIEW SET CLUSTER is not supported, for more information consult the documentation at https://materialize\.com/docs/sql/alter\-set\-cluster/
ALTER VIEW mv SET CLUSTER default
query error db error: ERROR: Cannot modify view as MATERIALIZED VIEW
ALTER MATERIALIZED VIEW v SET CLUSTER default
query error db error: ERROR: ALTER SINK SET CLUSTER not yet supported, see https://github\.com/MaterializeInc/materialize/issues/20841 for more details
ALTER SINK v SET CLUSTER default