|
36 | 36 | import static org.apache.seatunnel.common.exception.CommonErrorCode.GET_CATALOG_TABLES_WITH_UNSUPPORTED_TYPE_ERROR;
|
37 | 37 | import static org.apache.seatunnel.common.exception.CommonErrorCode.GET_CATALOG_TABLE_WITH_UNSUPPORTED_TYPE_ERROR;
|
38 | 38 | import static org.apache.seatunnel.common.exception.CommonErrorCode.JSON_OPERATION_FAILED;
|
| 39 | +import static org.apache.seatunnel.common.exception.CommonErrorCode.OPERATION_NOT_SUPPORTED; |
39 | 40 | import static org.apache.seatunnel.common.exception.CommonErrorCode.SQL_TEMPLATE_HANDLED_ERROR;
|
40 | 41 | import static org.apache.seatunnel.common.exception.CommonErrorCode.UNSUPPORTED_DATA_TYPE;
|
41 | 42 | import static org.apache.seatunnel.common.exception.CommonErrorCode.UNSUPPORTED_ENCODING;
|
| 43 | +import static org.apache.seatunnel.common.exception.CommonErrorCode.VERSION_NOT_SUPPORTED; |
42 | 44 | import static org.apache.seatunnel.common.exception.CommonErrorCode.WRITE_SEATUNNEL_ROW_ERROR;
|
43 | 45 |
|
44 | 46 | /**
|
@@ -96,6 +98,13 @@ public static SeaTunnelRuntimeException unsupportedDataType(
|
96 | 98 | return new SeaTunnelRuntimeException(UNSUPPORTED_DATA_TYPE, params);
|
97 | 99 | }
|
98 | 100 |
|
| 101 | + public static SeaTunnelRuntimeException unsupportedVersion(String identifier, String version) { |
| 102 | + Map<String, String> params = new HashMap<>(); |
| 103 | + params.put("identifier", identifier); |
| 104 | + params.put("version", version); |
| 105 | + return new SeaTunnelRuntimeException(VERSION_NOT_SUPPORTED, params); |
| 106 | + } |
| 107 | + |
99 | 108 | public static SeaTunnelRuntimeException unsupportedEncoding(String encoding) {
|
100 | 109 | Map<String, String> params = new SingletonMap<>("encoding", encoding);
|
101 | 110 | return new SeaTunnelRuntimeException(UNSUPPORTED_ENCODING, params);
|
@@ -185,6 +194,14 @@ public static SeaTunnelRuntimeException jsonOperationError(
|
185 | 194 | }
|
186 | 195 | }
|
187 | 196 |
|
| 197 | + public static SeaTunnelRuntimeException unsupportedOperation( |
| 198 | + String identifier, String operation) { |
| 199 | + Map<String, String> params = new HashMap<>(); |
| 200 | + params.put("identifier", identifier); |
| 201 | + params.put("operation", operation); |
| 202 | + return new SeaTunnelRuntimeException(OPERATION_NOT_SUPPORTED, params); |
| 203 | + } |
| 204 | + |
188 | 205 | public static SeaTunnelRuntimeException sqlTemplateHandledError(
|
189 | 206 | String tableName,
|
190 | 207 | String keyName,
|
|
0 commit comments