{"record":{"id":"dd8a89b5063a84cf","repo":"prestodb/presto","slug":"unsupported-parquet-type","errorCode":null,"errorMessage":"Unsupported Parquet type: ","messagePattern":"Unsupported Parquet type: ","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"presto-parquet/src/main/java/com/facebook/presto/parquet/predicate/TupleDomainParquetPredicate.java","lineNumber":705,"sourceCode":"        private Function<Object, Object> getColumnIndexConversions(PrimitiveType type)\n        {\n            switch (type.getPrimitiveTypeName()) {\n                case BOOLEAN:\n                    return buffer -> ((ByteBuffer) buffer).get(0) != 0;\n                case INT32:\n                    return buffer -> (long) ((ByteBuffer) buffer).order(LITTLE_ENDIAN).getInt(0);\n                case INT64:\n                    return buffer -> ((ByteBuffer) buffer).order(LITTLE_ENDIAN).getLong(0);\n                case FLOAT:\n                    return buffer -> ((ByteBuffer) buffer).order(LITTLE_ENDIAN).getFloat(0);\n                case DOUBLE:\n                    return buffer -> ((ByteBuffer) buffer).order(LITTLE_ENDIAN).getDouble(0);\n                case BINARY:\n                case FIXED_LEN_BYTE_ARRAY:\n                case INT96:\n                    return binary -> ByteBuffer.wrap(((Binary) binary).getBytes());\n                default:\n                    throw new IllegalArgumentException(\"Unsupported Parquet type: \" + type.getPrimitiveTypeName());\n            }\n        }\n    }\n}\n","sourceCodeStart":687,"sourceCodeEnd":710,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-parquet/src/main/java/com/facebook/presto/parquet/predicate/TupleDomainParquetPredicate.java#L687-L710","documentation":"Thrown by getColumnIndexConversions in TupleDomainParquetPredicate when building a converter that decodes Parquet ColumnIndex (page-level min/max) values into Java objects for predicate pushdown. The switch covers BOOLEAN, INT32, INT64, FLOAT, DOUBLE, BINARY, FIXED_LEN_BYTE_ARRAY and INT96; any other primitive type name reaches the default branch and fails. Like the dictionary converter, all current enum members are handled, so it only triggers with an unrecognized type value.","triggerScenarios":"getColumnIndexConversions(type) is called while reading a column's Parquet ColumnIndex statistics and the column's PrimitiveTypeName is not among the eight handled values — realistically only a newly introduced PrimitiveTypeName enum value from a newer parquet-mr, since BOOLEAN and all numeric/binary types are covered.","commonSituations":"Mixed-version clusters where files written by a newer Parquet writer (new primitive type) are read by an older Presto build; library dependency drift where presto-parquet pulls an older parquet-column enum than the writer used.","solutions":["Upgrade to a Presto release that supports the primitive type present in the file.","Add a case for the missing PrimitiveTypeName in getColumnIndexConversions, returning the correct ByteBuffer decoder.","Work around by dropping or rewriting the column index (rewrite file with parquet-tools rewrite or disable column-index filtering for that column).","Inspect the file's column statistics types with parquet-tools to confirm the offending type."],"exampleFix":"// before\ndefault:\n    throw new IllegalArgumentException(\"Unsupported Parquet type: \" + type.getPrimitiveTypeName());\n\n// after\ncase NEW_PRIMITIVE_TYPE:\n    return binary -> ByteBuffer.wrap(((Binary) binary).getBytes());\ndefault:\n    throw new IllegalArgumentException(\"Unsupported Parquet type: \" + type.getPrimitiveTypeName());","handlingStrategy":"validation","validationCode":"// Guard before enabling column-index based filtering\nPrimitiveTypeName name = type.getPrimitiveTypeName();\nboolean supported = name == PrimitiveTypeName.BOOLEAN || name == PrimitiveTypeName.INT32 ||\n    name == PrimitiveTypeName.INT64 || name == PrimitiveTypeName.FLOAT ||\n    name == PrimitiveTypeName.DOUBLE || name == PrimitiveTypeName.BINARY ||\n    name == PrimitiveTypeName.FIXED_LEN_BYTE_ARRAY || name == PrimitiveTypeName.INT96;\nif (!supported) { /* disable column index pushdown for this column */ }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Upgrade Presto to a release matching the parquet writer version that produced the files.","Disable column-index filtering when scanning files from untested writers.","Rewrite files with standard types and current writers."],"tags":["parquet","column-index","unsupported-type","predicate-pushdown"],"backgroundTag":"unsupported-parquet-primitive-type","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"}