{"record":{"id":"cc39b64e92ceb6ce","repo":"prestodb/presto","slug":"not-supported-cc39b6","errorCode":"NOT_SUPPORTED","errorMessage":"Unsupported column type %s for prefilled column: %s","messagePattern":"Unsupported column type (.+?) for prefilled column: (.+?)","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-hive/src/main/java/com/facebook/presto/hive/HiveRecordCursor.java","lineNumber":162,"sourceCode":"                    slices[columnIndex] = varcharPartitionKey(columnValue, name, type);\n                }\n                else if (isCharType(type)) {\n                    slices[columnIndex] = charPartitionKey(columnValue, name, type);\n                }\n                else if (DATE.equals(type)) {\n                    longs[columnIndex] = datePartitionKey(columnValue, name);\n                }\n                else if (TIMESTAMP.equals(type)) {\n                    longs[columnIndex] = timestampPartitionKey(session.getSqlFunctionProperties().isLegacyTimestamp(), columnValue, hiveStorageTimeZone, name);\n                }\n                else if (isShortDecimal(type)) {\n                    longs[columnIndex] = shortDecimalPartitionKey(columnValue, (DecimalType) type, name);\n                }\n                else if (isLongDecimal(type)) {\n                    slices[columnIndex] = longDecimalPartitionKey(columnValue, (DecimalType) type, name);\n                }\n                else {\n                    throw new PrestoException(NOT_SUPPORTED, format(\"Unsupported column type %s for prefilled column: %s\", type.getDisplayName(), name));\n                }\n            }\n        }\n    }\n\n    @Override\n    public long getCompletedBytes()\n    {\n        return delegate.getCompletedBytes();\n    }\n\n    @Override\n    public Type getType(int field)\n    {\n        return types[field];\n    }\n\n    @Override","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-hive/src/main/java/com/facebook/presto/hive/HiveRecordCursor.java#L144-L180","documentation":"HiveRecordCursor prefills partition-key values into the cursor without reading files. Prefill only supports primitive types with dedicated converters; if a partition key's declared type has no prefill path, it throws NOT_SUPPORTED naming the type and column.","triggerScenarios":"HiveRecordCursor constructor builds prefilled partition columns; a partition key column's type is neither boolean, bigint/integer-family, date, timestamp, varchar/string, nor short/long decimal, so no branch matches.","commonSituations":"Partition key declared as an exotic type (e.g. binary, map/array as partition key, char of odd size), tables created by external tools writing unusual partition column types, version mismatches where a newer type was added as partition key.","solutions":["Change the partition column's type to a supported one (string, bigint, date, timestamp, decimal).","Recreate the table with standard partition-key types and repartition the data.","Cast in the query won't help (error happens at split setup) — fix the metastore schema instead.","Upgrade Presto if a newer version added prefill support for the type."],"exampleFix":"-- before: partition key of unsupported type (e.g. binary)\nCREATE TABLE t (...) PARTITIONED BY (pk binary);\n-- after\nCREATE TABLE t (...) PARTITIONED BY (pk varchar);","handlingStrategy":"validation","validationCode":"-- verify partition key types are pref supported before querying\nSHOW COLUMNS FROM table_name; -- check partition column types\n-- supported: boolean, bigint, integer, smallint, tinyint, date, timestamp, varchar, decimal","typeGuard":null,"tryCatchPattern":"catch (PrestoException e) {\n    if (\"NOT_SUPPORTED\".equals(e.getErrorCode().getName())\n            && e.getMessage().contains(\"prefilled column\")) {\n        // fix partition column type in metastore or recreate table\n    }\n}","preventionTips":["Use only standard types (string/bigint/date/timestamp/decimal) for partition keys.","Validate DDL from external tools before pointing Presto at new tables.","Cast awkward partition types to varchar at table creation time, not query time.","Check connector release notes for newly supported prefill types before upgrading schemas."],"tags":["hive","record-cursor","partition-key","not-supported","type-system"],"backgroundTag":"unsupported-partition-key-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"}