2017-10-15 121 views
0

我有卡桑德拉集羣(2個節點),我試圖改變value列類型地圖。卡桑德拉 - 類型塗改不允許

在cqlsh執行ALTER TABLE "keyspace"."table" ALTER value TYPE Map;後,我得到一個錯誤,修改不允許的。 (表爲空)

CREATE TABLE "keyspace"."table" (
    key text, 
    column1 bigint, 
    column2 bigint, 
    value text, 
    PRIMARY KEY (key, column1, column2) 
) WITH COMPACT STORAGE 
    AND CLUSTERING ORDER BY (column1 ASC, column2 ASC) 
    AND bloom_filter_fp_chance = 0.1 
    AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'} 
    AND comment = '' 
    AND compaction = {'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'} 
    AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.SnappyCompressor'} 
    AND crc_check_chance = 1.0 
    AND dclocal_read_repair_chance = 0.05 
    AND default_time_to_live = 0 
    AND gc_grace_seconds = 5 
    AND max_index_interval = 2048 
    AND memtable_flush_period_in_ms = 0 
    AND min_index_interval = 128 
    AND read_repair_chance = 0.0 
    AND speculative_retry = '99PERCENTILE'; 

[cqlsh 5.0.1 | Cassandra 3.11.0 | CQL規範3.4.4 |本地協議V4]

是否有可能改變表此表的結構?什麼會導致這個問題?

感謝

回答

0

那種改變是不幸的是沒有在卡桑德拉支持。有關CQL數據類型和支持的轉換的參考信息,請參閱Datastax documentation

我不知道這是否會工作,但你可以嘗試刪除列,然後重新創建它?