Skip to content

Commit ff0ac32

Browse files
committed
Fix
1 parent 3c55b65 commit ff0ac32

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

core/src/main/java/com/scalar/db/common/CoreError.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -889,12 +889,6 @@ public enum CoreError implements ScalarDbError {
889889
"Object Storage does not support the feature for altering column types",
890890
"",
891891
""),
892-
OBJECT_STORAGE_CLUSTERING_KEY_BLOB_TYPE_NOT_SUPPORTED(
893-
Category.USER_ERROR,
894-
"0256",
895-
"The BLOB type is not supported for clustering keys in Object Storage. Column: %s",
896-
"",
897-
""),
898892

899893
//
900894
// Errors for the concurrency error category

core/src/main/java/com/scalar/db/storage/objectstorage/ObjectStorageAdmin.java

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public void createTable(
8787
String namespace, String table, TableMetadata metadata, Map<String, String> options)
8888
throws ExecutionException {
8989
try {
90-
checkMetadata(metadata);
90+
checkTableMetadata(metadata);
9191
// Insert the table metadata
9292
String tableMetadataKey = getTableMetadataKey(namespace, table);
9393
Map<String, String> readVersionMap = new HashMap<>();
@@ -269,7 +269,7 @@ public void repairTable(
269269
String namespace, String table, TableMetadata metadata, Map<String, String> options)
270270
throws ExecutionException {
271271
try {
272-
checkMetadata(metadata);
272+
checkTableMetadata(metadata);
273273
// Upsert the table metadata
274274
String tableMetadataKey = getTableMetadataKey(namespace, table);
275275
Map<String, String> readVersionMap = new HashMap<>();
@@ -473,14 +473,7 @@ private static String getTableNameFromTableMetadataKey(String tableMetadataKey)
473473
return parts.get(1);
474474
}
475475

476-
private void checkMetadata(TableMetadata metadata) {
477-
for (String clusteringKeyName : metadata.getClusteringKeyNames()) {
478-
if (metadata.getColumnDataType(clusteringKeyName) == DataType.BLOB) {
479-
throw new IllegalArgumentException(
480-
CoreError.OBJECT_STORAGE_CLUSTERING_KEY_BLOB_TYPE_NOT_SUPPORTED.buildMessage(
481-
clusteringKeyName));
482-
}
483-
}
476+
private void checkTableMetadata(TableMetadata metadata) {
484477
Set<String> secondaryIndexNames = metadata.getSecondaryIndexNames();
485478
if (!secondaryIndexNames.isEmpty()) {
486479
throw new IllegalArgumentException(

0 commit comments

Comments
 (0)