File tree Expand file tree Collapse file tree 2 files changed +40
-7
lines changed
e2e_test/sink/sink_into_table Expand file tree Collapse file tree 2 files changed +40
-7
lines changed Original file line number Diff line number Diff line change @@ -355,3 +355,43 @@ drop table m_drop_1;
355
355
356
356
statement ok
357
357
drop table t_drop_1;
358
+
359
+ statement ok
360
+ create table t1 (v1 int);
361
+
362
+ statement ok
363
+ create table t2 (v1 int primary key, v2 int as v1 + 10, v3 timestamptz as proctime());
364
+
365
+ statement ok
366
+ create sink s1 into t2 from t1;
367
+
368
+ statement ok
369
+ insert into t1 values (1), (2);
370
+
371
+ query II rowsort
372
+ select v1, v2 from t2;
373
+ ----
374
+ 1 11
375
+ 2 12
376
+
377
+ statement ok
378
+ alter table t2 add column v4 int default 100;
379
+
380
+ statement ok
381
+ insert into t1 values (3);
382
+
383
+ query III rowsort
384
+ select v1, v2, v4 from t2;
385
+ ----
386
+ 1 11 100
387
+ 2 12 100
388
+ 3 13 100
389
+
390
+ statement ok
391
+ drop sink s1;
392
+
393
+ statement ok
394
+ drop table t1;
395
+
396
+ statement ok
397
+ drop table t2;
Original file line number Diff line number Diff line change @@ -126,13 +126,6 @@ pub async fn handle_alter_table_column(
126
126
let ( original_catalog, has_incoming_sinks) =
127
127
fetch_table_catalog_for_alter ( session. as_ref ( ) , & table_name) ?;
128
128
129
- if has_incoming_sinks && original_catalog. has_generated_column ( ) {
130
- return Err ( RwError :: from ( ErrorCode :: BindError (
131
- "Alter a table with incoming sink and generated column has not been implemented."
132
- . to_owned ( ) ,
133
- ) ) ) ;
134
- }
135
-
136
129
if original_catalog. webhook_info . is_some ( ) {
137
130
return Err ( RwError :: from ( ErrorCode :: BindError (
138
131
"Adding/dropping a column of a table with webhook has not been implemented." . to_owned ( ) ,
You can’t perform that action at this time.
0 commit comments