{"record":{"id":"c58150c67ab3d95b","repo":"apache/seatunnel","slug":"unsupported-action-type-actiontype","errorCode":null,"errorMessage":"Unsupported action type: {actionType}","messagePattern":"Unsupported action type: (.+?)","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/catalog/DorisCatalog.java","lineNumber":540,"sourceCode":"            return new SQLPreviewResult(\n                    DorisCatalogUtil.getCreateTableStatement(\n                            createTableTemplate,\n                            tablePath,\n                            catalogTable.get(),\n                            // used for test when typeConverter is null\n                            typeConverter != null ? typeConverter : DorisTypeConverterV2.INSTANCE));\n        } else if (actionType == ActionType.DROP_TABLE) {\n            return new SQLPreviewResult(DorisCatalogUtil.getDropTableQuery(tablePath, true));\n        } else if (actionType == ActionType.TRUNCATE_TABLE) {\n            return new SQLPreviewResult(DorisCatalogUtil.getTruncateTableQuery(tablePath));\n        } else if (actionType == ActionType.CREATE_DATABASE) {\n            return new SQLPreviewResult(\n                    DorisCatalogUtil.getCreateDatabaseQuery(tablePath.getDatabaseName(), true));\n        } else if (actionType == ActionType.DROP_DATABASE) {\n            return new SQLPreviewResult(\n                    DorisCatalogUtil.getDropDatabaseQuery(tablePath.getDatabaseName(), true));\n        } else {\n            throw new UnsupportedOperationException(\"Unsupported action type: \" + actionType);\n        }\n    }\n}\n","sourceCodeStart":522,"sourceCodeEnd":544,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/catalog/DorisCatalog.java#L522-L544","documentation":"DorisCatalog.previewAction only supports previewing CREATE_DATABASE and DROP_DATABASE actions; any other ActionType reaches the final else and throws UnsupportedOperationException. This is a guard against preview requests for action types DorisCatalog has not implemented.","triggerScenarios":"Calling catalog.previewAction(actionType, tablePath, catalogTable) with any ActionType other than CREATE_DATABASE or DROP_DATABASE (e.g. CREATE_TABLE, DROP_TABLE, truncation actions).","commonSituations":"Tooling or UI code that iterates over all ActionType values and previews each; new ActionType enum values added upstream but not yet handled by the Doris catalog.","solutions":["Only call previewAction with ActionType.CREATE_DATABASE or ActionType.DROP_DATABASE","Add a branch in previewAction for the desired ActionType that returns the corresponding SQLPreviewResult","Check the ActionType value passed by your caller before invoking"],"exampleFix":"// before\nSQLPreviewResult r = catalog.previewAction(ActionType.CREATE_TABLE, tablePath, Optional.empty());\n// after\nSQLPreviewResult r = ActionType.CREATE_DATABASE == actionType || ActionType.DROP_DATABASE == actionType\n        ? catalog.previewAction(actionType, tablePath, Optional.empty())\n        : null; // CREATE_TABLE preview is unsupported for Doris catalog","handlingStrategy":"validation","validationCode":"Set<ActionType> supported = EnumSet.of(ActionType.CREATE_DATABASE, ActionType.DROP_DATABASE);\nif (!supported.contains(actionType)) {\n    throw new IllegalArgumentException(\"previewAction supports only CREATE_DATABASE/DROP_DATABASE, got: \" + actionType);\n}","typeGuard":"boolean previewSupported(ActionType t) {\n    return t == ActionType.CREATE_DATABASE || t == ActionType.DROP_DATABASE;\n}","tryCatchPattern":null,"preventionTips":["Only preview CREATE_DATABASE and DROP_DATABASE for Doris catalog","Switch on ActionType exhaustively and fail fast for unhandled values","Re-check support when upgrading SeaTunnel, as ActionType may gain new values"],"tags":["unsupported-operation","catalog","doris"],"backgroundTag":"unsupported-operation","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}