{"record":{"id":"934754641a0d7b68","repo":"prestodb/presto","slug":"hive-unknown-error","errorCode":"HIVE_UNKNOWN_ERROR","errorMessage":"%s is not supported","messagePattern":"(.+?) is not supported","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-hive/src/main/java/com/facebook/presto/hive/HivePageSourceProvider.java","lineNumber":308,"sourceCode":"                        hiveLayout.getSchemaTableName(),\n                        hiveSplit.getStorage().getStorageFormat().getSerDe()));\n    }\n\n    @VisibleForTesting\n    protected static CacheQuota generateCacheQuota(HiveSplit hiveSplit)\n    {\n        Optional<DataSize> quota = hiveSplit.getCacheQuotaRequirement().getQuota();\n        switch (hiveSplit.getCacheQuotaRequirement().getCacheQuotaScope()) {\n            case GLOBAL:\n                return new CacheQuota(\".\", quota);\n            case SCHEMA:\n                return new CacheQuota(hiveSplit.getDatabase(), quota);\n            case TABLE:\n                return new CacheQuota(hiveSplit.getDatabase() + \".\" + hiveSplit.getTable(), quota);\n            case PARTITION:\n                return new CacheQuota(hiveSplit.getDatabase() + \".\" + hiveSplit.getTable() + \".\" + hiveSplit.getPartitionName(), quota);\n            default:\n                throw new PrestoException(HIVE_UNKNOWN_ERROR, format(\"%s is not supported\", quota));\n        }\n    }\n\n    private static Optional<ConnectorPageSource> createSelectivePageSource(\n            Set<HiveSelectivePageSourceFactory> selectivePageSourceFactories,\n            Configuration configuration,\n            ConnectorSession session,\n            HiveSplit split,\n            HiveTableLayoutHandle layout,\n            List<HiveColumnHandle> selectedColumns,\n            DateTimeZone hiveStorageTimeZone,\n            TypeManager typeManager,\n            LoadingCache<RowExpressionCacheKey, RowExpression> rowExpressionCache,\n            SplitContext splitContext,\n            HiveFileContext fileContext,\n            Optional<EncryptionInformation> encryptionInformation)\n    {\n        Set<HiveColumnHandle> interimColumns = ImmutableSet.<HiveColumnHandle>builder()","sourceCodeStart":290,"sourceCodeEnd":326,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-hive/src/main/java/com/facebook/presto/hive/HivePageSourceProvider.java#L290-L326","documentation":"generateCacheQuota maps the configured hive.cache quota-target-type (DATABASE, TABLE, PARTITION) to a CacheQuota. Any other quota enum value reaches the default branch, which throws HIVE_UNKNOWN_ERROR saying the quota value is not supported.","triggerScenarios":"cacheQuota -> generateCacheQuota invoked with a CacheQuota whose quota/type falls outside the DATABASE/TABLE/PARTITION cases — typically a newly added enum constant or misconfigured quota type.","commonSituations":"Running a Presto version where a new quota-target type exists but generateCacheQuota wasn't updated, or a config/session value that deserialized into an unexpected quota type.","solutions":["Set the cache quota target type to DATABASE, TABLE, or PARTITION.","Upgrade or align the Presto version so connector code and enum values match.","Disable the cache quota configuration if not needed.","File/fix the connector to handle the new enum value in generateCacheQuota."],"exampleFix":"// before\ndefault: throw new PrestoException(HIVE_UNKNOWN_ERROR, format(\"%s is not supported\", quota));\n// after\ndefault: throw new PrestoException(HIVE_UNKNOWN_ERROR, format(\"Cache quota target %s is not supported\", quota));\n// or handle new cases before default\ncase SCHEMA: return new CacheQuota(hiveSplit.getDatabase(), quota);","handlingStrategy":"validation","validationCode":"// allowed cache quota targets\nSet<String> valid = Set.of(\"DATABASE\", \"TABLE\", \"PARTITION\");\nif (!valid.contains(quotaTargetType)) throw new IllegalArgumentException(\"unsupported quota target: \" + quotaTargetType);","typeGuard":null,"tryCatchPattern":"catch (PrestoException e) {\n    if (\"HIVE_UNKNOWN_ERROR\".equals(e.getErrorCode().getName())\n            && e.getMessage().contains(\"is not supported\")) {\n        // fix cache quota target-type config to DATABASE/TABLE/PARTITION\n    }\n}","preventionTips":["Only configure cache quota target types of DATABASE, TABLE, or PARTITION.","Keep client and server Presto versions aligned so enum values match.","Review cache config after connector upgrades for new/renamed quota types."],"tags":["hive","cache","quota","unsupported-value"],"backgroundTag":"unsupported-cache-quota","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"}