是否可以从 AWS Keyspaces table 中删除一列?

Is it possible to drop a column from AWS Keyspaces table?

我需要为 AWS Keyspaces 编写转入和回滚脚本。转入是

ALTER TABLE my_table ADD (
  next_value_1 double,
  next_value_2 double,
);

回滚脚本应该是什么?根据 Tutorial: Delete data in an Amazon Keyspaces table 上的内容,我无法从 table.

中删除列

You can delete a column from a specific row, individual rows from a table, all the rows from a table, an entire table, or a keyspace.

DDL statements 页中也没有 ALTER TABLE xxx DROP () 提及。

有什么办法吗?

看来你不能。从原来的post中的doc mentioned,支持的语法是:

ALTER TABLE table_name    

    [ ADD ( column_definition | column_definition_list)  ] 
    [[ADD | DROP] TAGS {'key1':'val1', 'key2':'val2'}]            
    [ WITH table_options [ , ... ] ] ;

看起来您可以 ADDDROP 标签 ,但您只能 ADD 列。如果您需要 DROP 列,您似乎必须重新创建 table.

尽管 AWS Keyspaces 被吹捧为 Cassandra 的直接替代品,但 many things that it simply does not support

请注意 ALTER TABLE table_name DROP column_name 确实适用于 Apache Cassandra and DataStax Astra DB