yuqi1129 commented on code in PR #9761:
URL: https://github.com/apache/gravitino/pull/9761#discussion_r2740180367
##########
catalogs-contrib/catalog-jdbc-clickhouse/src/main/java/org/apache/gravitino/catalog/clickhouse/converter/ClickHouseExceptionConverter.java:
##########
@@ -18,8 +18,36 @@
*/
package org.apache.gravitino.catalog.clickhouse.converter;
+import java.sql.SQLException;
import org.apache.gravitino.catalog.jdbc.converter.JdbcExceptionConverter;
+import org.apache.gravitino.exceptions.GravitinoRuntimeException;
+import org.apache.gravitino.exceptions.NoSuchSchemaException;
+import org.apache.gravitino.exceptions.NoSuchTableException;
+import org.apache.gravitino.exceptions.SchemaAlreadyExistsException;
+import org.apache.gravitino.exceptions.TableAlreadyExistsException;
public class ClickHouseExceptionConverter extends JdbcExceptionConverter {
- // Implement ClickHouse specific exception conversions if needed
+ static final int UNKNOWN_DATABASE = 81;
+ static final int DATABASE_ALREADY_EXISTS = 82;
+
+ static final int TABLE_ALREADY_EXISTS = 57;
+ static final int TABLE_IS_DROPPED = 218;
+
+ @SuppressWarnings("FormatStringAnnotation")
+ @Override
+ public GravitinoRuntimeException toGravitinoException(SQLException
sqlException) {
+ int errorCode = sqlException.getErrorCode();
+ switch (errorCode) {
Review Comment:
This will be conver by ITs raised later.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]