You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
dev=> create table sink_table (v1 int, v2 int, v3 int);
CREATE_TABLE
dev=> create table source (v1 int, v2 int, v3 int);
CREATE_TABLE
dev=> create sink s1 into sink_table as select v1, v2 from source with (type = 'append-only', force_append_only='true');
CREATE_SINK
dev=> alter table sink_table drop column v3;
ERROR: Failed to run the query
Caused by:
Invalid input syntax: dropping columns in the target table of sinks is not supported
It make senses that when v1 and v2 are referenced in the create sink statement, both columns cannot be dropped.
Even though v3 in sink_table is not referenced, RW disallows it to be dropped.
dev=> drop sink s1;
DROP_SINK
dev=> alter table sink_table drop column v3;
ALTER_TABLE
Although we can achieve the same purpose by first dropping all the sinks,
when the number of sinks is very large, it seems awkward to require users to drop and recreate all of the sinks.
Describe the solution you'd like
No response
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
If it is hard to be implemented, we can provide the drop and recreate statements when returning the error Caused by: Invalid input syntax: dropping columns in the target table of sinks is not supported
as a temporary solution to mitigate the tediousness. Sometimes, the existing sinks are not necessarily created by the same person and the one who tries to alter the column may also be a different person.
This is inspired by
dev=> create sink s1 into sink_table as select v1, v2 from source;
ERROR: Failed to run the query
Caused by:
Bind error: Only append-only sinks can sink to a table without primary keys. please try to add type = 'append-only' in the with option. e.g. create sink s into t as select * from t1 with (type = 'append-only')
I can copy the statement, without remembering what to write or looking up in the documentation.
lmatz
changed the title
drop a column a sink table when the column is not referred
drop a column of a sink table when the column is not referred
Jan 24, 2025
Is your feature request related to a problem? Please describe.
It make senses that when
v1
andv2
are referenced in thecreate sink
statement, both columns cannot be dropped.Even though v3 in
sink_table
is not referenced, RW disallows it to be dropped.Although we can achieve the same purpose by first dropping all the sinks,
when the number of sinks is very large, it seems awkward to require users to drop and recreate all of the sinks.
Describe the solution you'd like
No response
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: