Skip to content

Commit c26d52d

Browse files
committed
Merge remote-tracking branch 'origin/master' into add-blob-admin
2 parents df628e5 + aac0d47 commit c26d52d

File tree

27 files changed

+107
-485
lines changed

27 files changed

+107
-485
lines changed

.github/workflows/ci.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1967,7 +1967,7 @@ jobs:
19671967

19681968
- name: Upload Gradle test reports
19691969
if: always()
1970-
uses: actions/upload-artifact@v4
1970+
uses: actions/upload-artifact@v5
19711971
with:
19721972
name: tidb_6_5_integration_test_reports_${{ matrix.mode.label }}
19731973
path: core/build/reports/tests/integrationTestJdbc
@@ -2042,7 +2042,7 @@ jobs:
20422042

20432043
- name: Upload Gradle test reports
20442044
if: always()
2045-
uses: actions/upload-artifact@v4
2045+
uses: actions/upload-artifact@v5
20462046
with:
20472047
name: tidb_7_5_integration_test_reports_${{ matrix.mode.label }}
20482048
path: core/build/reports/tests/integrationTestJdbc
@@ -2117,7 +2117,7 @@ jobs:
21172117

21182118
- name: Upload Gradle test reports
21192119
if: always()
2120-
uses: actions/upload-artifact@v4
2120+
uses: actions/upload-artifact@v5
21212121
with:
21222122
name: tidb_8_5_integration_test_reports_${{ matrix.mode.label }}
21232123
path: core/build/reports/tests/integrationTestJdbc

build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id "com.diffplug.spotless" version "6.13.0"
3-
id "org.jreleaser" version "1.20.0"
3+
id "org.jreleaser" version "1.21.0"
44
}
55

66
ext {
@@ -30,11 +30,11 @@ subprojects {
3030
azureCosmosVersion = '4.75.0'
3131
azureBlobStorageVersion = '12.31.3'
3232
jooqVersion = '3.14.16'
33-
awssdkVersion = '2.36.2'
33+
awssdkVersion = '2.37.3'
3434
commonsDbcp2Version = '2.13.0'
3535
mysqlDriverVersion = '8.4.0'
3636
postgresqlDriverVersion = '42.7.8'
37-
oracleDriverVersion = '23.9.0.25.07'
37+
oracleDriverVersion = '23.26.0.0.0'
3838
sqlserverDriverVersion = '12.8.2.jre8'
3939
sqliteDriverVersion = '3.50.3.0'
4040
yugabyteDriverVersion = '42.7.3-yb-4'
@@ -43,7 +43,7 @@ subprojects {
4343
alloyDbJdbcConnectorVersion = '1.2.7'
4444
picocliVersion = '4.7.7'
4545
commonsTextVersion = '1.14.0'
46-
junitVersion = '5.14.0'
46+
junitVersion = '5.14.1'
4747
commonsLangVersion = '3.19.0'
4848
assertjVersion = '3.27.6'
4949
mockitoVersion = '4.11.0'

core/src/integration-test/java/com/scalar/db/storage/cassandra/CassandraAdminPermissionIntegrationTest.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -126,16 +126,6 @@ protected void waitForTableDeletion() {
126126
}
127127
}
128128

129-
@Test
130-
@Override
131-
@Disabled("Import-related functionality is not supported in Cassandra")
132-
public void getImportTableMetadata_WithSufficientPermission_ShouldSucceed() {}
133-
134-
@Test
135-
@Override
136-
@Disabled("Import-related functionality is not supported in Cassandra")
137-
public void addRawColumnToTable_WithSufficientPermission_ShouldSucceed() {}
138-
139129
@Test
140130
@Override
141131
@Disabled("Import-related functionality is not supported in Cassandra")

core/src/integration-test/java/com/scalar/db/storage/dynamo/DynamoAdminPermissionIntegrationTest.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,6 @@ protected void sleepBetweenTests() {
4545
Uninterruptibles.sleepUninterruptibly(SLEEP_BETWEEN_TESTS_SECONDS, TimeUnit.SECONDS);
4646
}
4747

48-
@Test
49-
@Override
50-
@Disabled("Import-related functionality is not supported in DynamoDB")
51-
public void getImportTableMetadata_WithSufficientPermission_ShouldSucceed() {}
52-
53-
@Test
54-
@Override
55-
@Disabled("Import-related functionality is not supported in DynamoDB")
56-
public void addRawColumnToTable_WithSufficientPermission_ShouldSucceed() {}
57-
5848
@Test
5949
@Override
6050
@Disabled("Import-related functionality is not supported in DynamoDB")

core/src/integration-test/java/com/scalar/db/storage/jdbc/JdbcSchemaLoaderImportIntegrationTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import java.util.Map;
1111
import java.util.Properties;
1212
import java.util.concurrent.TimeUnit;
13+
import org.junit.jupiter.api.AfterAll;
1314
import org.junit.jupiter.api.Test;
1415
import org.junit.jupiter.api.condition.DisabledIf;
1516
import org.slf4j.Logger;
@@ -191,6 +192,7 @@ public void importTables_ImportableTablesAndNonRelatedSameNameTableGiven_ShouldI
191192
super.importTables_ImportableTablesAndNonRelatedSameNameTableGiven_ShouldImportProperly();
192193
}
193194

195+
@AfterAll
194196
@Override
195197
public void afterAll() {
196198
try {

core/src/main/java/com/scalar/db/api/DistributedStorageAdmin.java

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
package com.scalar.db.api;
22

33
import com.scalar.db.exception.storage.ExecutionException;
4-
import com.scalar.db.io.DataType;
5-
import java.util.Collections;
6-
import java.util.Map;
74

85
/**
96
* An administrative interface for distributed storage implementations. The user can execute
@@ -44,50 +41,6 @@
4441
*/
4542
public interface DistributedStorageAdmin extends Admin, AutoCloseable {
4643

47-
/**
48-
* Get import table metadata in the ScalarDB format.
49-
*
50-
* @param namespace namespace name of import table
51-
* @param table import table name
52-
* @throws IllegalArgumentException if the table does not exist
53-
* @throws IllegalStateException if the table does not meet the requirement of ScalarDB table
54-
* @throws ExecutionException if the operation fails
55-
* @return import table metadata in the ScalarDB format
56-
*/
57-
default TableMetadata getImportTableMetadata(String namespace, String table)
58-
throws ExecutionException {
59-
return getImportTableMetadata(namespace, table, Collections.emptyMap());
60-
}
61-
62-
/**
63-
* Get import table metadata in the ScalarDB format.
64-
*
65-
* @param namespace namespace name of import table
66-
* @param table import table name
67-
* @param overrideColumnsType a map of column data type by column name. Only set the column for
68-
* which you want to override the default data type mapping.
69-
* @throws IllegalArgumentException if the table does not exist
70-
* @throws IllegalStateException if the table does not meet the requirement of ScalarDB table
71-
* @throws ExecutionException if the operation fails
72-
* @return import table metadata in the ScalarDB format
73-
*/
74-
TableMetadata getImportTableMetadata(
75-
String namespace, String table, Map<String, DataType> overrideColumnsType)
76-
throws ExecutionException;
77-
78-
/**
79-
* Add a column in the table without updating the metadata table in ScalarDB.
80-
*
81-
* @param namespace namespace name of import table
82-
* @param table import table name
83-
* @param columnName name of the column to be added
84-
* @param columnType type of the column to be added
85-
* @throws IllegalArgumentException if the table does not exist
86-
* @throws ExecutionException if the operation fails
87-
*/
88-
void addRawColumnToTable(String namespace, String table, String columnName, DataType columnType)
89-
throws ExecutionException;
90-
9144
/**
9245
* Returns the storage information.
9346
*

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

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -451,20 +451,6 @@ public Set<String> getNamespaceNames() throws ExecutionException {
451451
}
452452
}
453453

454-
@Override
455-
public TableMetadata getImportTableMetadata(
456-
String namespace, String table, Map<String, DataType> overrideColumnsType)
457-
throws ExecutionException {
458-
try {
459-
return admin.getImportTableMetadata(namespace, table, overrideColumnsType);
460-
} catch (ExecutionException e) {
461-
throw new ExecutionException(
462-
CoreError.GETTING_IMPORT_TABLE_METADATA_FAILED.buildMessage(
463-
ScalarDbUtils.getFullTableName(namespace, table)),
464-
e);
465-
}
466-
}
467-
468454
@Override
469455
public void importTable(
470456
String namespace,
@@ -489,20 +475,6 @@ public void importTable(
489475
}
490476
}
491477

492-
@Override
493-
public void addRawColumnToTable(
494-
String namespace, String table, String columnName, DataType columnType)
495-
throws ExecutionException {
496-
try {
497-
admin.addRawColumnToTable(namespace, table, columnName, columnType);
498-
} catch (ExecutionException e) {
499-
throw new ExecutionException(
500-
CoreError.ADDING_RAW_COLUMN_TO_TABLE_FAILED.buildMessage(
501-
ScalarDbUtils.getFullTableName(namespace, table), columnName, columnType),
502-
e);
503-
}
504-
}
505-
506478
@Override
507479
public void upgrade(Map<String, String> options) throws ExecutionException {
508480
try {

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -377,16 +377,16 @@ public enum CoreError implements ScalarDbError {
377377
""),
378378
MULTI_STORAGE_STORAGE_NOT_FOUND(
379379
Category.USER_ERROR, "0084", "Storage not found. Storage: %s", "", ""),
380-
JDBC_NAMESPACE_NAME_NOT_ACCEPTABLE(
381-
Category.USER_ERROR, "0085", "The namespace name is not acceptable. Namespace: %s", "", ""),
382-
JDBC_TABLE_NAME_NOT_ACCEPTABLE(
383-
Category.USER_ERROR, "0086", "The table name is not acceptable. Table: %s", "", ""),
384-
JDBC_IMPORT_NOT_SUPPORTED(
380+
JDBC_SQLITE_NAMESPACE_NAME_NOT_ACCEPTABLE(
385381
Category.USER_ERROR,
386-
"0087",
387-
"Importing tables is not allowed in the RDB engine. RDB engine: %s",
382+
"0085",
383+
"The namespace name is not acceptable in SQLite. Namespace: %s",
388384
"",
389385
""),
386+
JDBC_SQLITE_TABLE_NAME_NOT_ACCEPTABLE(
387+
Category.USER_ERROR, "0086", "The table name is not acceptable in SQLite. Table: %s", "", ""),
388+
JDBC_SQLITE_IMPORT_NOT_SUPPORTED(
389+
Category.USER_ERROR, "0087", "Importing tables is not allowed in SQLite", "", ""),
390390
JDBC_IMPORT_TABLE_WITHOUT_PRIMARY_KEY(
391391
Category.USER_ERROR, "0088", "The %s table must have a primary key", "", ""),
392392
JDBC_RDB_ENGINE_NOT_SUPPORTED(

core/src/main/java/com/scalar/db/service/AdminService.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -120,20 +120,6 @@ public void renameTable(String namespace, String oldTableName, String newTableNa
120120
admin.renameTable(namespace, oldTableName, newTableName);
121121
}
122122

123-
@Override
124-
public TableMetadata getImportTableMetadata(
125-
String namespace, String table, Map<String, DataType> overrideColumnsType)
126-
throws ExecutionException {
127-
return admin.getImportTableMetadata(namespace, table, overrideColumnsType);
128-
}
129-
130-
@Override
131-
public void addRawColumnToTable(
132-
String namespace, String table, String columnName, DataType columnType)
133-
throws ExecutionException {
134-
admin.addRawColumnToTable(namespace, table, columnName, columnType);
135-
}
136-
137123
@Override
138124
public void importTable(
139125
String namespace,

core/src/main/java/com/scalar/db/storage/cassandra/CassandraAdmin.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -285,20 +285,6 @@ private TableMetadata createTableMetadata(com.datastax.driver.core.TableMetadata
285285
return builder.build();
286286
}
287287

288-
@Override
289-
public TableMetadata getImportTableMetadata(
290-
String namespace, String table, Map<String, DataType> overrideColumnsType) {
291-
throw new UnsupportedOperationException(
292-
CoreError.CASSANDRA_IMPORT_NOT_SUPPORTED.buildMessage());
293-
}
294-
295-
@Override
296-
public void addRawColumnToTable(
297-
String namespace, String table, String columnName, DataType columnType) {
298-
throw new UnsupportedOperationException(
299-
CoreError.CASSANDRA_IMPORT_NOT_SUPPORTED.buildMessage());
300-
}
301-
302288
@Override
303289
public void importTable(
304290
String namespace,

0 commit comments

Comments
 (0)