prestodb/presto · error · PrestoException

GENERIC_INTERNAL_ERROR

GENERIC_INTERNAL_ERROR

Error message

Neither of encryptColumn or encryptTable present. We should never hit this

What it means

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.

Source

Thrown at presto-hive/src/main/java/com/facebook/presto/hive/AbstractDwrfEncryptionInformationSource.java:126

        if (encryptTable.isPresent()) {
            if (!requestedColumns.isPresent() || !requestedColumns.get().isEmpty()) {
                fieldToKeyReference = ImmutableMap.of(DwrfEncryptionMetadata.TABLE_IDENTIFIER, encryptTable.get());
            }
            else {
                fieldToKeyReference = ImmutableMap.of();
            }
        }
        else if (columnEncryptionInformation.isPresent()) {
            Map<ColumnWithStructSubfield, String> allFieldsToKeyReference = columnEncryptionInformation.get().getColumnToKeyReference();
            Optional<Set<String>> requestedColumnNames = requestedColumns.map(columns -> columns.stream().map(HiveColumnHandle::getName).collect(toImmutableSet()));

            fieldToKeyReference = allFieldsToKeyReference.entrySet()
                    .stream()
                    .filter(entry -> requestedColumnNames.map(columns -> columns.contains(entry.getKey().getColumnName())).orElse(true))
                    .collect(toImmutableMap(entry -> entry.getKey().toString(), Map.Entry::getValue));
        }
        else {
            throw new PrestoException(GENERIC_INTERNAL_ERROR, "Neither of encryptColumn or encryptTable present. We should never hit this");
        }

        return Optional.of(fieldToKeyReference);
    }

    private static Optional<DwrfTableEncryptionProperties> getTableEncryptionProperties(Table table)
    {
        if (!OrcSerde.class.getName().equals(table.getStorage().getStorageFormat().getSerDe())) {
            return Optional.empty();
        }

        return fromHiveTableProperties(table.getParameters());
    }
}

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Check the table's encryption properties for malformed values
  2. Re-create the table with valid encrypt_table or encrypt_columns settings
  3. Report as a connector bug if the properties appear valid
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at presto-hive/src/main/java/com/facebook/presto/hive/AbstractDwrfEncryptionInformationSource.java:126 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04). Data as JSON: /api/errors/364e2c11cffeb210. Report an issue: GitHub.