apache/seatunnel · error · UnsupportedOperationException
Unsupported action type:
Error message
Unsupported action type:
What it means
MilvusCatalog.previewAction computes a human-readable preview for supported catalog actions (create/drop table/collection, create/drop database). An ActionType outside these branches throws UnsupportedOperationException with 'Unsupported action type: <action>'. This is a completeness guard, meaning the preview feature does not cover that action.
Source
Thrown at seatunnel-connectors-v2/connector-milvus/src/main/java/org/apache/seatunnel/connectors/seatunnel/milvus/catalog/MilvusCatalog.java:127
@Override
public String name() {
return catalogName;
}
@Override
public PreviewResult previewAction(
ActionType actionType, TablePath tablePath, Optional<CatalogTable> catalogTable) {
if (actionType == ActionType.CREATE_TABLE) {
return new InfoPreviewResult("create collection " + tablePath.getTableName());
} else if (actionType == ActionType.DROP_TABLE) {
return new InfoPreviewResult("drop collection " + tablePath.getTableName());
} else if (actionType == ActionType.CREATE_DATABASE) {
return new InfoPreviewResult("create database " + tablePath.getDatabaseName());
} else if (actionType == ActionType.DROP_DATABASE) {
return new InfoPreviewResult("drop database " + tablePath.getDatabaseName());
} else {
throw new UnsupportedOperationException("Unsupported action type: " + actionType);
}
}
@Override
public String getDefaultDatabase() throws CatalogException {
return "default";
}
@Override
public boolean databaseExists(String databaseName) throws CatalogException {
List<String> databases = this.listDatabases();
return databases.contains(databaseName);
}
@Override
public List<String> listDatabases() throws CatalogException {
R<ListDatabasesResponse> response = this.client.listDatabases();
return response.getData().getDbNamesList();View on GitHub (pinned to cf67b549a7)
Solutions
- Only invoke previewAction with actions Milvus supports (create/drop table, create/drop database).
- Extend MilvusCatalog.previewAction with a branch for the missing ActionType if it is a legitimate new action.
- Check the SeaTunnel version: update Milvus connector to a release where the missing action is handled.
Example fix
// before
throw new UnsupportedOperationException("Unsupported action type: " + actionType);
// after
} else if (actionType == ActionType.TRUNCATE_TABLE) {
return new InfoPreviewResult("truncate collection " + tablePath.getTableName());
} else {
throw new UnsupportedOperationException("Unsupported action type: " + actionType); Defensive patterns
Strategy: type-guard
Validate before calling
if (actionType != ActionType.CREATE_TABLE && actionType != ActionType.DROP_TABLE
&& actionType != ActionType.CREATE_DATABASE && actionType != ActionType.DROP_DATABASE) {
throw new IllegalArgumentException("Milvus catalog does not support preview for " + actionType);
} Type guard
boolean isPreviewableByMilvus(ActionType t) {
return t == ActionType.CREATE_TABLE || t == ActionType.DROP_TABLE
|| t == ActionType.CREATE_DATABASE || t == ActionType.DROP_DATABASE;
} Try / catch
try {
result = milvusCatalog.previewAction(tablePath, actionType);
} catch (UnsupportedOperationException e) {
log.warn("No preview available for {} on Milvus: {}", actionType, e.getMessage());
result = new InfoPreviewResult("(preview unsupported for " + actionType + ")");
} Prevention
- Guard ActionType against Milvus-supported set before calling previewAction
- Update the Milvus connector when new ActionType values are introduced in the catalog API
When it happens
Trigger: Calling catalog.previewAction(tablePath, actionType) with an ActionType not handled by MilvusCatalog (e.g. a newer action enum added by the catalog API that Milvus has no preview branch for, or a caller passing an unexpected action).
Common situations: Future-facing catalog code invoking preview with action types added after this Milvus implementation was written; plugin/framework callers enumerating all ActionType values against catalogs that don't support all of them.
Related errors
- Unsupported action type: {actionType}
- Unsupported action type: ${actionType}
- Hudi catalog not support truncate table.
- Unsupported action type:
- Unsupported action type: ${actionType}
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/4a37671dd0a78497.
Report an issue: GitHub.