Skip to content

Commit fc51ea1

Browse files
committed
Apply suggestions
1 parent 776c08b commit fc51ea1

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -796,10 +796,16 @@ public enum CoreError implements ScalarDbError {
796796
"SQLite does not support the altering column type feature",
797797
"",
798798
""),
799-
JDBC_UNSUPPORTED_COLUMN_TYPE_CONVERSION(
799+
JDBC_ORACLE_UNSUPPORTED_COLUMN_TYPE_CONVERSION(
800800
Category.USER_ERROR,
801801
"0239",
802-
"The storage does not support column type conversion from %s to %s",
802+
"Oracle does not support column type conversion from %s to %s",
803+
"",
804+
""),
805+
JDBC_DB2_UNSUPPORTED_COLUMN_TYPE_CONVERSION(
806+
Category.USER_ERROR,
807+
"0240",
808+
"Db2 does not support column type conversion from %s to %s",
803809
"",
804810
""),
805811

core/src/main/java/com/scalar/db/storage/jdbc/RdbEngineDb2.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ public void throwIfRenameColumnNotSupported(String columnName, TableMetadata tab
553553
public void throwIfAlterColumnTypeNotSupported(DataType from, DataType to) {
554554
if (from == DataType.BLOB && to == DataType.TEXT) {
555555
throw new UnsupportedOperationException(
556-
CoreError.JDBC_UNSUPPORTED_COLUMN_TYPE_CONVERSION.buildMessage(
556+
CoreError.JDBC_DB2_UNSUPPORTED_COLUMN_TYPE_CONVERSION.buildMessage(
557557
from.toString(), to.toString()));
558558
}
559559
}

core/src/main/java/com/scalar/db/storage/jdbc/RdbEngineOracle.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ public String tryAddIfNotExistsToCreateIndexSql(String createIndexSql) {
447447
public void throwIfAlterColumnTypeNotSupported(DataType from, DataType to) {
448448
if (!(from == DataType.INT && to == DataType.BIGINT)) {
449449
throw new UnsupportedOperationException(
450-
CoreError.JDBC_UNSUPPORTED_COLUMN_TYPE_CONVERSION.buildMessage(
450+
CoreError.JDBC_ORACLE_UNSUPPORTED_COLUMN_TYPE_CONVERSION.buildMessage(
451451
from.toString(), to.toString()));
452452
}
453453
}

0 commit comments

Comments
 (0)