Skip to content

Commit 0c3c753

Browse files
committed
Merge remote-tracking branch 'origin/master' into db2_change_blob_type_mapping
# Conflicts: # core/src/main/java/com/scalar/db/common/CoreError.java
2 parents bfd7191 + 98ffa4d commit 0c3c753

File tree

5 files changed

+18
-9
lines changed

5 files changed

+18
-9
lines changed

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ subprojects {
2929
cassandraDriverVersion = '3.11.5'
3030
azureCosmosVersion = '4.74.0'
3131
jooqVersion = '3.14.16'
32-
awssdkVersion = '2.33.0'
32+
awssdkVersion = '2.34.0'
3333
commonsDbcp2Version = '2.13.0'
3434
mysqlDriverVersion = '8.4.0'
35-
postgresqlDriverVersion = '42.7.7'
35+
postgresqlDriverVersion = '42.7.8'
3636
oracleDriverVersion = '23.9.0.25.07'
3737
sqlserverDriverVersion = '12.8.1.jre8'
3838
sqliteDriverVersion = '3.50.3.0'
@@ -43,7 +43,7 @@ subprojects {
4343
commonsTextVersion = '1.14.0'
4444
junitVersion = '5.13.4'
4545
commonsLangVersion = '3.18.0'
46-
assertjVersion = '3.27.4'
46+
assertjVersion = '3.27.5'
4747
mockitoVersion = '4.11.0'
4848
spotbugsVersion = '4.8.6'
4949
errorproneVersion = '2.10.0'

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -736,15 +736,21 @@ public enum CoreError implements ScalarDbError {
736736
"The BOOLEAN type is not supported for index columns in DynamoDB. Column: %s",
737737
"",
738738
""),
739-
JDBC_DB2_INDEX_OR_KEY_ON_BLOB_COLUMN_NOT_SUPPORTED(
739+
CASSANDRA_TIMESTAMP_TYPE_NOT_SUPPORTED(
740740
Category.USER_ERROR,
741741
"0227",
742+
"The TIMESTAMP type is not supported in Cassandra. Column: %s",
743+
"",
744+
""),
745+
JDBC_DB2_INDEX_OR_KEY_ON_BLOB_COLUMN_NOT_SUPPORTED(
746+
Category.USER_ERROR,
747+
"0228",
742748
"With Db2, using a BLOB column as partition key, clustering key or secondary index is not supported.",
743749
"",
744750
""),
745751
JDBC_DB2_CROSS_PARTITION_SCAN_ORDERING_ON_BLOB_COLUMN_NOT_SUPPORTED(
746752
Category.USER_ERROR,
747-
"0228",
753+
"0229",
748754
"With Db2, setting an ordering on a BLOB column when using a cross partition scan operation is not supported. Ordering: %s",
749755
"",
750756
""),

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public void createTable(
7777
for (String column : metadata.getColumnNames()) {
7878
if (metadata.getColumnDataTypes().get(column).equals(DataType.TIMESTAMP)) {
7979
throw new UnsupportedOperationException(
80-
"The TIMESTAMP data type is not supported in Cassandra. column: " + column);
80+
CoreError.CASSANDRA_TIMESTAMP_TYPE_NOT_SUPPORTED.buildMessage(column));
8181
}
8282
}
8383
try {
@@ -394,7 +394,7 @@ public void addNewColumnToTable(
394394
throws ExecutionException {
395395
if (columnType == DataType.TIMESTAMP) {
396396
throw new UnsupportedOperationException(
397-
"The TIMESTAMP data type is not supported in Cassandra. column: " + columnName);
397+
CoreError.CASSANDRA_TIMESTAMP_TYPE_NOT_SUPPORTED.buildMessage(columnName));
398398
}
399399
try {
400400
String alterTableQuery =

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import com.datastax.driver.core.Row;
44
import com.scalar.db.api.Result;
55
import com.scalar.db.api.TableMetadata;
6+
import com.scalar.db.common.CoreError;
67
import com.scalar.db.common.ResultImpl;
78
import com.scalar.db.io.BigIntColumn;
89
import com.scalar.db.io.BlobColumn;
@@ -86,7 +87,7 @@ private Column<?> convert(Row row, String name, DataType type) {
8687
: TimeColumn.of(name, LocalTime.ofNanoOfDay(row.getTime(name)));
8788
case TIMESTAMP:
8889
throw new UnsupportedOperationException(
89-
"The TIMESTAMP type is not supported with Cassandra.");
90+
CoreError.CASSANDRA_TIMESTAMP_TYPE_NOT_SUPPORTED.buildMessage(name));
9091
case TIMESTAMPTZ:
9192
return row.isNull(name)
9293
? TimestampTZColumn.ofNull(name)

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import static com.google.common.base.Preconditions.checkNotNull;
44

55
import com.datastax.driver.core.BoundStatement;
6+
import com.scalar.db.common.CoreError;
67
import com.scalar.db.io.BigIntColumn;
78
import com.scalar.db.io.BlobColumn;
89
import com.scalar.db.io.BooleanColumn;
@@ -134,7 +135,8 @@ public void visit(TimeColumn column) {
134135

135136
@Override
136137
public void visit(TimestampColumn column) {
137-
throw new UnsupportedOperationException("The TIMESTAMP type is not supported with Cassandra");
138+
throw new UnsupportedOperationException(
139+
CoreError.CASSANDRA_TIMESTAMP_TYPE_NOT_SUPPORTED.buildMessage(column.getName()));
138140
}
139141

140142
@Override

0 commit comments

Comments
 (0)