{"record":{"id":"1c3ab56cb0092907","repo":"apache/seatunnel","slug":"text-file-does-not-support-this-compress-type-1c3ab5","errorCode":null,"errorMessage":"Text file does not support this compress type: {}","messagePattern":"Text file does not support this compress type: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/TextReadStrategy.java","lineNumber":200,"sourceCode":"    @Override\n    public void readProcess(\n            FileSourceSplit split,\n            Collector<SeaTunnelRow> output,\n            InputStream inputStream,\n            Map<String, String> partitionsMap,\n            String currentFileName)\n            throws IOException {\n        InputStream actualInputStream;\n        switch (compressFormat) {\n            case LZO:\n                LzopCodec lzo = new LzopCodec();\n                actualInputStream = lzo.createInputStream(inputStream);\n                break;\n            case NONE:\n                actualInputStream = inputStream;\n                break;\n            default:\n                log.warn(\n                        \"Text file does not support this compress type: {}\",\n                        compressFormat.getCompressCodec());\n                actualInputStream = inputStream;\n                break;\n        }\n        // rebuild inputStream\n        final boolean useSplitRead = enableSplitFile && split.getLength() > -1;\n        if (useSplitRead) {\n            actualInputStream = safeSlice(actualInputStream, split.getStart(), split.getLength());\n        }\n        try (BufferedReader reader = createBomAwareBufferedReader(actualInputStream, encoding)) {\n\n            LineProcessor lineProcessor =\n                    line -> {\n                        try {\n                            processLineData(line, split.getTableId(), output, partitionsMap);\n                        } catch (FileConnectorException e) {\n                            throw new IOException(e);","sourceCodeStart":182,"sourceCodeEnd":218,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/TextReadStrategy.java#L182-L218","documentation":"TextReadStrategy.readProcess encountered a CompressFormat that the plain-text reader cannot wrap a decompressing stream around. The switch over compress format has cases for the supported codecs (e.g. GZIP, LZO, NONE) and falls into the default branch for anything else. It logs this warning, falls back to reading the raw (still-compressed) bytes, and continues, which means the parsed rows are almost certainly garbage.","triggerScenarios":"Assigning a file source a compress codec that TextReadStrategy has no case for, e.g. a compress format enum value added for other readers (ORC/Parquet-only codecs like SNAPPY variants) but mapped onto a text file, or a newly introduced CompressFormat not yet handled in the switch.","commonSituations":"Configuring format=text with compress codec options copied from a Parquet/ORC job; upgrading SeaTunnel where a new compress enum value exists but the text path was not updated; user setting compress=snappy on a .txt file expecting transparent snappy text decompression.","solutions":["Change the job config so the text-format source uses a supported compress codec (NONE/GZIP/LZO) or remove the compress option","Verify the actual file compression matches the configured codec; recompress or decompress the file to a supported format","If the codec genuinely must be supported, add a case in the switch in TextReadStrategy.readProcess that wraps the input stream with the appropriate decompressor"],"exampleFix":"// before (config)\nsource {\n  LocalFile {\n    format = text\n    compress = snappy\n  }\n}\n// after\nsource {\n  LocalFile {\n    format = text\n    compress = none\n  }\n}","handlingStrategy":"validation","validationCode":"// Before submitting the job, check the compress codec against text-supported values\njava.util.Set<String> supported = new java.util.HashSet<>(\n        java.util.Arrays.asList(\"NONE\", \"GZIP\", \"LZO\"));\nif (!supported.contains(compressFormat.name())) {\n    throw new IllegalArgumentException(\n            \"format=text does not support compress codec: \" + compressFormat.name());\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only configure compress codecs documented for format=text (none/gzip/lzo)","Do not copy compress settings from Parquet/ORC jobs into text-format sources","After upgrading SeaTunnel, re-check that the configured compress enum still exists and is supported for text"],"tags":["file-connector","compression","unsupported-compress-codec"],"backgroundTag":"unsupported-enum-value","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}