prestodb/presto · error · PrestoException

INVALID_TABLE_PROPERTY

INVALID_TABLE_PROPERTY

Error message

Encrypted columns property cannot have null value

What it means

A guard in ColumnEncryptionInformation parsing: the encrypted-columns table property, after splitting into entries, contained a null element (e.g. from an entry like the empty segment of a trailing delimiter), so no column-to-key-reference mapping can be built. It reports malformed Hive table property input rather than a runtime state problem.

Source

Thrown at presto-hive-metastore/src/main/java/com/facebook/presto/hive/ColumnEncryptionInformation.java:122

            return new ColumnEncryptionInformation(ImmutableMap.of());
        }

        List<String> keyReferenceWithColumns = Splitter.on(HIVE_PROPERTY_ENTRY_DELIMITER).trimResults().splitToList(value);
        return fromTableProperty(keyReferenceWithColumns);
    }

    public static ColumnEncryptionInformation fromTableProperty(Object value)
    {
        if (value == null) {
            return new ColumnEncryptionInformation(ImmutableMap.of());
        }

        List<?> data = (List<?>) value;

        Map<ColumnWithStructSubfield, String> columnToKeyReference = new HashMap<>();
        for (Object entry : data) {
            if (entry == null) {
                throw new PrestoException(INVALID_TABLE_PROPERTY, "Encrypted columns property cannot have null value");
            }

            String keyEntry = (String) entry;

            List<String> keyEntries = Splitter.on(HIVE_PROPERTY_KEY_JOINER).splitToList(keyEntry);

            if (keyEntries.size() != 2) {
                throw new PrestoException(INVALID_TABLE_PROPERTY, format("Encrypted column entry needs to be in the format 'key1:col1,col2'. Received: %s", keyEntry));
            }

            String keyReference = keyEntries.get(0);
            String columns = keyEntries.get(1);

            List<String> columnList = Splitter.on(HIVE_PROPERTY_COLUMN_DELIMITER).trimResults().splitToList(columns);

            columnList.forEach(column -> {
                String previousReferenceKey = columnToKeyReference.put(ColumnWithStructSubfield.valueOf(column), keyReference);
                if (previousReferenceKey != null) {

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Fix the encrypted columns table property so every entry is of the form column=keyReference with no empty or null entries
  2. Remove trailing or doubled delimiters from the property value
  3. Use SHOW CREATE TABLE to inspect and correct the property, then ALTER TABLE SET TBLPROPERTIES to fix it
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at presto-hive-metastore/src/main/java/com/facebook/presto/hive/ColumnEncryptionInformation.java:122 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/aa2a8bb75e0c8a94. Report an issue: GitHub.