{"record":{"id":"c578dfe21fe5f52a","repo":"apache/flink","slug":"could-not-stop-with-a-detached-savepoint-job","errorCode":null,"errorMessage":"Could not stop with a detached savepoint job \"{}\".","messagePattern":"Could not stop with a detached savepoint job \"(.+?)\"\\.","errorType":"exception","errorClass":"FlinkException","httpStatus":null,"severity":"error","filePath":"flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java","lineNumber":848,"sourceCode":"            ClusterClient<?> clusterClient,\n            JobID jobId,\n            boolean advanceToEndOfEventTime,\n            String targetDirectory,\n            SavepointFormatType formatType,\n            Duration clientTimeout)\n            throws FlinkException {\n        logAndSysout(\"Triggering stop-with-savepoint in detached mode for job \" + jobId + '.');\n        try {\n            final String triggerId =\n                    clusterClient\n                            .stopWithDetachedSavepoint(\n                                    jobId, advanceToEndOfEventTime, targetDirectory, formatType)\n                            .get(clientTimeout.toMillis(), TimeUnit.MILLISECONDS);\n            logAndSysout(\n                    \"Successfully trigger stop-with-savepoint in detached mode, triggerId: \"\n                            + triggerId);\n        } catch (Exception e) {\n            throw new FlinkException(\n                    \"Could not stop with a detached savepoint job \\\"\" + jobId + \"\\\".\", e);\n        }\n    }\n\n    /** Sends a SavepointTriggerMessage to the job manager. */\n    private void triggerSavepoint(\n            ClusterClient<?> clusterClient,\n            JobID jobId,\n            String savepointDirectory,\n            SavepointFormatType formatType,\n            Duration clientTimeout)\n            throws FlinkException {\n        logAndSysout(\"Triggering savepoint for job \" + jobId + '.');\n\n        CompletableFuture<String> savepointPathFuture =\n                clusterClient.triggerSavepoint(jobId, savepointDirectory, formatType);\n\n        logAndSysout(\"Waiting for response...\");","sourceCodeStart":830,"sourceCodeEnd":866,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java#L830-L866","documentation":"Thrown from NestedPrimitiveColumnReader.dictionaryDecodeValue when a dictionary-encoded nested column value's logical type root is not covered by the dictionary-decode switch (same shape as the plain-read switch: only numeric, binary/string, and timestamp cases). The message names the logical type that could not be decoded from the dictionary.","triggerScenarios":"Dictionary-encoded nested (array/map element) columns of a type root absent from dictionaryDecodeValue — e.g. DECIMAL, TIME, BOOLEAN, DATE depending on physical type; same class of gap as the plain-read switch but on the dictionary path.","commonSituations":"Arrays of decimals or times written with dictionary encoding; files from writers that dictionary-encode aggressively; Flink versions whose nested reader switch lags the flat reader's type coverage.","solutions":["Check the message's type against dictionaryDecodeValue's switch coverage in your Flink version","Re-write the data with dictionary encoding disabled for that column, which routes reads through the plain-read path (may still be unsupported — verify)","Project out or restructure the unsupported nested column; or flatten/convert with Spark first","Upgrade Flink — nested type coverage gaps are fixed incrementally; otherwise file a JIRA"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":"// Same supported-type check as the plain path, plus detect dictionary encoding from footer\nfor (Encoding enc : cc.getEncodings()) {\n    if (enc.usesDictionary() && !nestedTypeSupported(elementType)) {\n        // dictionary-encoded nested column of unsupported type will hit this error\n        return Decision.CONVERT_FILE; // e.g. rewrite via Spark with dictionary disabled\n    }\n}","typeGuard":"static boolean nestedDictionarySafe(LogicalType elem, Collection<Encoding> encs) {\n    return nestedTypeSupported(elem) || encs.stream().noneMatch(Encoding::usesDictionary);\n}","tryCatchPattern":"try {\n    reader.readAndNewVector(...);\n} catch (RuntimeException e) {\n    if (String.valueOf(e.getMessage()).startsWith(\"Unsupported type in the list\")) {\n        rewriteFileWithoutDictionaries(file);\n    } else throw e;\n}","preventionTips":["Disable dictionary encoding for nested columns of uncommon element types at write time (parquet.enable.dictionary=false per-column where supported)","Track Flink release notes for nested-reader type coverage improvements","Test representative dictionary-encoded nested data in your upgrade CI"],"tags":["parquet","nested","dictionary","type-mismatch"],"backgroundTag":null,"analyzedSha":"2f3c205e9266cb30240eb7f4fdab15cad629a70f","analyzedAt":"2026-08-14T08:48:24.518Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}