prestodb/presto · error · IllegalArgumentException

Unsupported table properties value: %s = %s (type: %s)

Error message

Unsupported table properties value: %s = %s (type: %s)

What it means

When building table Properties from the verifier configuration map, VerificationQueryRewriterFactory.constructProperties only maps String and Boolean values to literals. Any other value type (Integer, Long, Double, List, Map) triggers this IllegalArgumentException because there is no literal mapping for it.

Source

Thrown at presto-verifier/src/main/java/com/facebook/presto/verifier/rewrite/VerificationQueryRewriterFactory.java:118

    public static List<Property> constructProperties(Map<String, Object> propertiesMap)
    {
        ImmutableList.Builder<Property> properties = ImmutableList.builder();
        for (Entry<String, Object> entry : propertiesMap.entrySet()) {
            if (entry.getValue() instanceof Integer || entry.getValue() instanceof Long) {
                properties.add(new Property(new Identifier(entry.getKey()), new LongLiteral(String.valueOf(entry.getValue()))));
            }
            else if (entry.getValue() instanceof Double) {
                properties.add(new Property(new Identifier(entry.getKey()), new DoubleLiteral(String.valueOf(entry.getValue()))));
            }
            else if (entry.getValue() instanceof String) {
                properties.add(new Property(new Identifier(entry.getKey()), new StringLiteral((String) entry.getValue())));
            }
            else if (entry.getValue() instanceof Boolean) {
                properties.add(new Property(new Identifier(entry.getKey()), ((Boolean) entry.getValue()) ? BooleanLiteral.TRUE_LITERAL : FALSE_LITERAL));
            }
            else {
                throw new IllegalArgumentException(format("Unsupported table properties value: %s = %s (type: %s)", entry.getKey(), entry.getValue(), entry.getValue().getClass()));
            }
        }
        return properties.build();
    }
}

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Quote numeric values in the configuration so they are Strings (e.g. "42" instead of 42)
  2. Convert the value to String/Boolean in the configuration source before it reaches the verifier
  3. Extend constructProperties with branches for other types (Integer, Long, Double, List) mapping them to appropriate Literals

Example fix

// before
"transactional": true,
"num_rows": 42
// after
"transactional": true,
"num_rows": "42"
Defensive patterns

Strategy: validation

Validate before calling

for (Map.Entry<String, Object> e : tableProperties.entrySet()) {
    if (!(e.getValue() instanceof String) && !(e.getValue() instanceof Boolean)) {
        throw new IllegalArgumentException("Table property " + e.getKey() + " must be String or Boolean, got: " + e.getValue().getClass());
    }
}

Type guard

boolean isSupportedPropertyValue(Object v) {
    return v instanceof String || v instanceof Boolean;
}

Try / catch

try {
    List<Property> props = factory.constructProperties(rawProperties);
} catch (IllegalArgumentException ex) {
    if (ex.getMessage().startsWith("Unsupported table properties value")) {
        log.error("Fix verifier config: %s", ex.getMessage());
    }
    throw ex;
}

Prevention

When it happens

Trigger: A table properties entry in the verifier JSON/config has a value that is neither String nor Boolean — e.g. a numeric property or a nested structure (arrays, objects).

Common situations: Config authors write table properties with unquoted numbers ("num_rows": 42) or nested values where the code expects strings/booleans; schema changes in the verifier JSON add typed properties the factory doesn't recognize; YAML/JSON parsing yields Integer where the author meant a String.

Related errors


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