{"record":{"id":"5cd5b6fc3d36d4a3","repo":"prestodb/presto","slug":"parquet-unsupported-column-type","errorCode":"PARQUET_UNSUPPORTED_COLUMN_TYPE","errorMessage":"Column: %s, Encoding: %s","messagePattern":"Column: (.+?), Encoding: (.+?)","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-parquet/src/main/java/com/facebook/presto/parquet/batchreader/decoders/Decoders.java","lineNumber":170,"sourceCode":"                        }\n                        return new BinaryLongDecimalPlainValuesDecoder(buffer, offset, length);\n                    }\n                    return new BinaryPlainValuesDecoder(buffer, offset, length);\n                case FIXED_LEN_BYTE_ARRAY:\n                    if (isDecimalType(columnDescriptor)) {\n                        if (isShortDecimalType(columnDescriptor)) {\n                            return new FixedLenByteArrayShortDecimalPlainValuesDecoder(columnDescriptor, buffer, offset, length);\n                        }\n\n                        int typeLength = columnDescriptor.getPrimitiveType().getTypeLength();\n                        return new FixedLenByteArrayLongDecimalPlainValuesDecoder(typeLength, buffer, offset, length);\n                    }\n                    else if (isUuidType(columnDescriptor)) {\n                        int typeLength = columnDescriptor.getPrimitiveType().getTypeLength();\n                        return new FixedLenByteArrayUuidPlainValuesDecoder(typeLength, buffer, offset, length);\n                    }\n                default:\n                    throw new PrestoException(PARQUET_UNSUPPORTED_COLUMN_TYPE, format(\"Column: %s, Encoding: %s\", columnDescriptor, encoding));\n            }\n        }\n\n        if (encoding == RLE && type == BOOLEAN) {\n            ByteBuffer byteBuffer = ByteBuffer.wrap(buffer, offset, length);\n            byteBuffer.getInt(); // skip past the length\n            return new BooleanRLEValuesDecoder(byteBuffer);\n        }\n\n        if (encoding == RLE_DICTIONARY || encoding == PLAIN_DICTIONARY) {\n            InputStream inputStream = ByteBufferInputStream.wrap(ByteBuffer.wrap(buffer, offset, length));\n            int bitWidth = readIntLittleEndianOnOneByte(inputStream);\n            switch (type) {\n                case INT32:\n                case FLOAT: {\n                    if (isShortDecimalType(columnDescriptor)) {\n                        return new Int32ShortDecimalRLEDictionaryValuesDecoder(bitWidth, inputStream, (IntegerDictionary) dictionary);\n                    }","sourceCodeStart":152,"sourceCodeEnd":188,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-parquet/src/main/java/com/facebook/presto/parquet/batchreader/decoders/Decoders.java#L152-L188","documentation":"PrestoException (PARQUET_UNSUPPORTED_COLUMN_TYPE) thrown by Decoders.createValuesDecoder() when a PLAIN-encoded column's primitive type falls into the switch's default case — i.e., the (type, encoding) combination has no decoder implementation. The message names the column descriptor and encoding.","triggerScenarios":"createValuesDecoder() is called for a PLAIN-encoded page whose primitive type is not one of the handled types (INT32/INT64/FLOAT/DOUBLE/BINARY/FIXED_LEN_BYTE_ARRAY decimal/uuid/int96-adjacent cases), e.g., PLAIN FIXED_LEN_BYTE_ARRAY that is neither decimal nor UUID, or an unhandled type like a novel physical type.","commonSituations":"Reading Parquet files written by newer or non-conforming writers using type/encoding combos Presto's batch reader doesn't support; fixed_len_byte_array columns that aren't decimal or UUID; older Presto versions lacking decoders for a type.","solutions":["Identify the physical type via parquet-tools dump and check it's supported by your Presto version.","Upgrade Presto to a version with a decoder for that type/encoding combo.","Re-write the data with a supported type (e.g., map fixed_len_byte_array to UUID/DECIMAL or BINARY).","Use the legacy (non-batch) reader if available via session/catalog config.","File/patch a decoder case in Decoders.createValuesDecoder()."],"exampleFix":"// before\n// PLAIN FIXED_LEN_BYTE_ARRAY with unknown semantic type -> default case throws\n// after\n// at write time, use a supported type\ncolumnSchema.put(\"blob\", FIXED_LEN_BYTE_ARRAY) // -> instead: Types.BINARY or DECIMAL/UUID\n","handlingStrategy":"validation","validationCode":"// inspect physical type before scanning\nPrimitiveTypeName t = columnDescriptor.getPrimitive().getPrimitiveTypeName();\nif (t == PrimitiveTypeName.FIXED_LEN_BYTE_ARRAY && !isDecimal && !isUuid)\n    throw new IllegalArgumentException(\"Unsupported PLAIN FIXED_LEN_BYTE_ARRAY column: \" + columnDescriptor);\n","typeGuard":"boolean isSupportedPlainType(ColumnDescriptor d) {\n    switch (d.getPrimitiveType().getPrimitiveTypeName()) {\n        case INT32: case INT64: case FLOAT: case DOUBLE: case BINARY: return true;\n        case FIXED_LEN_BYTE_ARRAY: return isDecimalType(d) || isUuidType(d);\n        default: return false;\n    }\n}","tryCatchPattern":"try {\n    decoder = Decoders.readFlatPage(page, columnDescriptor, dictionary);\n} catch (PrestoException e) {\n    if (e.getErrorCode().getName().equals(\"PARQUET_UNSUPPORTED_COLUMN_TYPE\")) {\n        // upgrade reader or rewrite data with supported type\n    }\n    throw e;\n}","preventionTips":["Check the file's schema/physical types with parquet-tools before querying","Upgrade Presto before reading files from newer writers","Write non-decimal/UUID fixed byte arrays as BINARY","Fall back to the legacy reader when the batch reader lacks a decoder"],"tags":["parquet","unsupported-type","encoding","presto"],"backgroundTag":"parquet-unsupported-encoding","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}