{"record":{"id":"364e2c11cffeb210","repo":"prestodb/presto","slug":"generic-internal-error-364e2c","errorCode":"GENERIC_INTERNAL_ERROR","errorMessage":"Neither of encryptColumn or encryptTable present. We should never hit this","messagePattern":"Neither of encryptColumn or encryptTable present\\. We should never hit this","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-hive/src/main/java/com/facebook/presto/hive/AbstractDwrfEncryptionInformationSource.java","lineNumber":126,"sourceCode":"        if (encryptTable.isPresent()) {\n            if (!requestedColumns.isPresent() || !requestedColumns.get().isEmpty()) {\n                fieldToKeyReference = ImmutableMap.of(DwrfEncryptionMetadata.TABLE_IDENTIFIER, encryptTable.get());\n            }\n            else {\n                fieldToKeyReference = ImmutableMap.of();\n            }\n        }\n        else if (columnEncryptionInformation.isPresent()) {\n            Map<ColumnWithStructSubfield, String> allFieldsToKeyReference = columnEncryptionInformation.get().getColumnToKeyReference();\n            Optional<Set<String>> requestedColumnNames = requestedColumns.map(columns -> columns.stream().map(HiveColumnHandle::getName).collect(toImmutableSet()));\n\n            fieldToKeyReference = allFieldsToKeyReference.entrySet()\n                    .stream()\n                    .filter(entry -> requestedColumnNames.map(columns -> columns.contains(entry.getKey().getColumnName())).orElse(true))\n                    .collect(toImmutableMap(entry -> entry.getKey().toString(), Map.Entry::getValue));\n        }\n        else {\n            throw new PrestoException(GENERIC_INTERNAL_ERROR, \"Neither of encryptColumn or encryptTable present. We should never hit this\");\n        }\n\n        return Optional.of(fieldToKeyReference);\n    }\n\n    private static Optional<DwrfTableEncryptionProperties> getTableEncryptionProperties(Table table)\n    {\n        if (!OrcSerde.class.getName().equals(table.getStorage().getStorageFormat().getSerDe())) {\n            return Optional.empty();\n        }\n\n        return fromHiveTableProperties(table.getParameters());\n    }\n}\n","sourceCodeStart":108,"sourceCodeEnd":141,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-hive/src/main/java/com/facebook/presto/hive/AbstractDwrfEncryptionInformationSource.java#L108-L141","documentation":"Defensive sentinel at the end of DWRF encryption metadata resolution: neither table-level nor column-level encryption information is present, which the code treats as an impossible state for a table flagged as encrypted.","triggerScenarios":"Thrown at presto-hive/src/main/java/com/facebook/presto/hive/AbstractDwrfEncryptionInformationSource.java:126 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the table's encryption properties for malformed values","Re-create the table with valid encrypt_table or encrypt_columns settings","Report as a connector bug if the properties appear valid"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}