From 60707b6f8687d0d72804822c42431d0ed7059b37 Mon Sep 17 00:00:00 2001 From: Cheng Pan Date: Tue, 6 Feb 2024 19:22:29 +0800 Subject: [PATCH] Core: Update ClickHouseErrCode to align upstream --- .../exception/ClickHouseErrCode.java | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/clickhouse-core/src/main/java/xenon/clickhouse/exception/ClickHouseErrCode.java b/clickhouse-core/src/main/java/xenon/clickhouse/exception/ClickHouseErrCode.java index f3a311c5..a718a4fe 100644 --- a/clickhouse-core/src/main/java/xenon/clickhouse/exception/ClickHouseErrCode.java +++ b/clickhouse-core/src/main/java/xenon/clickhouse/exception/ClickHouseErrCode.java @@ -18,6 +18,7 @@ import org.slf4j.LoggerFactory; // Periodically sync from https://github.com/ClickHouse/ClickHouse/blob/master/src/Common/ErrorCodes.cpp +// copy and replace `M\((\d+),\s(.*)\).*\\` with `$2($1, "$2"),` public enum ClickHouseErrCode { UNKNOWN_ERROR(-2, "UNKNOWN_ERROR"), CLIENT_ERROR(-1, "CLIENT_ERROR"), @@ -626,6 +627,55 @@ public enum ClickHouseErrCode { WRONG_DDL_RENAMING_SETTINGS(648, "WRONG_DDL_RENAMING_SETTINGS"), INVALID_TRANSACTION(649, "INVALID_TRANSACTION"), SERIALIZATION_ERROR(650, "SERIALIZATION_ERROR"), + CAPN_PROTO_BAD_TYPE(651, "CAPN_PROTO_BAD_TYPE"), + ONLY_NULLS_WHILE_READING_SCHEMA(652, "ONLY_NULLS_WHILE_READING_SCHEMA"), + CANNOT_PARSE_BACKUP_SETTINGS(653, "CANNOT_PARSE_BACKUP_SETTINGS"), + WRONG_BACKUP_SETTINGS(654, "WRONG_BACKUP_SETTINGS"), + FAILED_TO_SYNC_BACKUP_OR_RESTORE(655, "FAILED_TO_SYNC_BACKUP_OR_RESTORE"), + UNKNOWN_STATUS_OF_TRANSACTION(659, "UNKNOWN_STATUS_OF_TRANSACTION"), + HDFS_ERROR(660, "HDFS_ERROR"), + CANNOT_SEND_SIGNAL(661, "CANNOT_SEND_SIGNAL"), + FS_METADATA_ERROR(662, "FS_METADATA_ERROR"), + INCONSISTENT_METADATA_FOR_BACKUP(663, "INCONSISTENT_METADATA_FOR_BACKUP"), + ACCESS_STORAGE_DOESNT_ALLOW_BACKUP(664, "ACCESS_STORAGE_DOESNT_ALLOW_BACKUP"), + CANNOT_CONNECT_NATS(665, "CANNOT_CONNECT_NATS"), + NOT_INITIALIZED(667, "NOT_INITIALIZED"), + INVALID_STATE(668, "INVALID_STATE"), + NAMED_COLLECTION_DOESNT_EXIST(669, "NAMED_COLLECTION_DOESNT_EXIST"), + NAMED_COLLECTION_ALREADY_EXISTS(670, "NAMED_COLLECTION_ALREADY_EXISTS"), + NAMED_COLLECTION_IS_IMMUTABLE(671, "NAMED_COLLECTION_IS_IMMUTABLE"), + INVALID_SCHEDULER_NODE(672, "INVALID_SCHEDULER_NODE"), + RESOURCE_ACCESS_DENIED(673, "RESOURCE_ACCESS_DENIED"), + RESOURCE_NOT_FOUND(674, "RESOURCE_NOT_FOUND"), + CANNOT_PARSE_IPV4(675, "CANNOT_PARSE_IPV4"), + CANNOT_PARSE_IPV6(676, "CANNOT_PARSE_IPV6"), + THREAD_WAS_CANCELED(677, "THREAD_WAS_CANCELED"), + IO_URING_INIT_FAILED(678, "IO_URING_INIT_FAILED"), + IO_URING_SUBMIT_ERROR(679, "IO_URING_SUBMIT_ERROR"), + MIXED_ACCESS_PARAMETER_TYPES(690, "MIXED_ACCESS_PARAMETER_TYPES"), + UNKNOWN_ELEMENT_OF_ENUM(691, "UNKNOWN_ELEMENT_OF_ENUM"), + TOO_MANY_MUTATIONS(692, "TOO_MANY_MUTATIONS"), + AWS_ERROR(693, "AWS_ERROR"), + ASYNC_LOAD_CYCLE(694, "ASYNC_LOAD_CYCLE"), + ASYNC_LOAD_FAILED(695, "ASYNC_LOAD_FAILED"), + ASYNC_LOAD_CANCELED(696, "ASYNC_LOAD_CANCELED"), + CANNOT_RESTORE_TO_NONENCRYPTED_DISK(697, "CANNOT_RESTORE_TO_NONENCRYPTED_DISK"), + INVALID_REDIS_STORAGE_TYPE(698, "INVALID_REDIS_STORAGE_TYPE"), + INVALID_REDIS_TABLE_STRUCTURE(699, "INVALID_REDIS_TABLE_STRUCTURE"), + USER_SESSION_LIMIT_EXCEEDED(700, "USER_SESSION_LIMIT_EXCEEDED"), + CLUSTER_DOESNT_EXIST(701, "CLUSTER_DOESNT_EXIST"), + CLIENT_INFO_DOES_NOT_MATCH(702, "CLIENT_INFO_DOES_NOT_MATCH"), + INVALID_IDENTIFIER(703, "INVALID_IDENTIFIER"), + QUERY_CACHE_USED_WITH_NONDETERMINISTIC_FUNCTIONS(704, "QUERY_CACHE_USED_WITH_NONDETERMINISTIC_FUNCTIONS"), + TABLE_NOT_EMPTY(705, "TABLE_NOT_EMPTY"), + LIBSSH_ERROR(706, "LIBSSH_ERROR"), + GCP_ERROR(707, "GCP_ERROR"), + ILLEGAL_STATISTIC(708, "ILLEGAL_STATISTIC"), + CANNOT_GET_REPLICATED_DATABASE_SNAPSHOT(709, "CANNOT_GET_REPLICATED_DATABASE_SNAPSHOT"), + FAULT_INJECTED(710, "FAULT_INJECTED"), + FILECACHE_ACCESS_DENIED(711, "FILECACHE_ACCESS_DENIED"), + TOO_MANY_MATERIALIZED_VIEWS(712, "TOO_MANY_MATERIALIZED_VIEWS"), + BROKEN_PROJECTION(713, "BROKEN_PROJECTION"), KEEPER_EXCEPTION(999, "KEEPER_EXCEPTION"), POCO_EXCEPTION(1000, "POCO_EXCEPTION"), STD_EXCEPTION(1001, "STD_EXCEPTION"),