DATACASS-536 - Deprecate TableOption.COMPACT_STORAGE.
Cassandra 4.x has deprecated compact storage so we're reflecting these changes in our table creation support.
This commit is contained in:
@@ -130,7 +130,6 @@ public class AlterTableCqlGenerator extends TableOptionsCqlGenerator<AlterTableS
|
||||
|
||||
/*
|
||||
* Compact storage is illegal on alter table.
|
||||
* TODO - Is there a way to handle this in the specification?
|
||||
*/
|
||||
if (key.equals(TableOption.COMPACT_STORAGE.getName())) {
|
||||
throw new IllegalArgumentException("Alter table cannot contain the COMPACT STORAGE option");
|
||||
|
||||
@@ -25,6 +25,7 @@ import org.springframework.lang.Nullable;
|
||||
* value. Implements {@link Option} via delegation, since {@link Enum}s can't extend anything.
|
||||
*
|
||||
* @author Matthew T. Adams
|
||||
* @author Mark Paluch
|
||||
* @see CompactionOption
|
||||
* @see CompressionOption
|
||||
* @see CachingOption
|
||||
@@ -37,7 +38,10 @@ public enum TableOption implements Option {
|
||||
COMMENT("comment", String.class, true, true, true),
|
||||
/**
|
||||
* {@code COMPACT STORAGE}
|
||||
*
|
||||
* @deprecated since 2.2. Cassandra 4.x has deprecated compact storage.
|
||||
*/
|
||||
@Deprecated
|
||||
COMPACT_STORAGE("COMPACT STORAGE", Void.class, false, false, false),
|
||||
/**
|
||||
* {@code compaction}. Value is a <code>Map<CompactionOption,Object></code>.
|
||||
|
||||
@@ -38,6 +38,7 @@ import com.datastax.driver.core.TableOptionsMetadata;
|
||||
* @author David Webb
|
||||
* @author Alex Shvid
|
||||
* @author Antoine Toulme
|
||||
* @author Mark Paluch
|
||||
*/
|
||||
public class CqlTableSpecificationAssertions {
|
||||
|
||||
@@ -155,8 +156,6 @@ public class CqlTableSpecificationAssertions {
|
||||
return (T) CqlStringUtils.singleQuote(options.getComment());
|
||||
case COMPACTION:
|
||||
return (T) options.getCompaction();
|
||||
case COMPACT_STORAGE:
|
||||
throw new Error(); // TODO: figure out
|
||||
case COMPRESSION:
|
||||
return (T) options.getCompression();
|
||||
case DCLOCAL_READ_REPAIR_CHANCE:
|
||||
@@ -166,7 +165,8 @@ public class CqlTableSpecificationAssertions {
|
||||
case READ_REPAIR_CHANCE:
|
||||
return (T) (Double) options.getReadRepairChance();
|
||||
}
|
||||
return null;
|
||||
|
||||
throw new IllegalArgumentException("Unsupported option: " + option);
|
||||
}
|
||||
|
||||
public static void assertColumns(List<ColumnSpecification> expected, List<ColumnMetadata> actual) {
|
||||
|
||||
Reference in New Issue
Block a user