prestodb/presto · error · IllegalArgumentException

Unsupported Parquet primitive type:

Error message

Unsupported Parquet primitive type: 

What it means

Thrown by DictionaryValueConverter.getConverter in TupleDomainParquetPredicate when building a per-dictionary-page value converter for predicate pushdown. The switch maps each Parquet primitive type (INT32, INT64, FLOAT, DOUBLE, BINARY, FIXED_LEN_BYTE_ARRAY, INT96) to a Dictionary decode function; any type name not covered hits the default branch. With the current parquet-mr enum all primitives are covered, so this only fires when a new PrimitiveTypeName value appears that this code does not know about.

Source

Thrown at presto-parquet/src/main/java/com/facebook/presto/parquet/predicate/TupleDomainParquetPredicate.java:523

        }

        private Function<Integer, Object> getConverter(PrimitiveType primitiveType)
        {
            switch (primitiveType.getPrimitiveTypeName()) {
                case INT32:
                    return (i) -> dictionary.decodeToInt(i);
                case INT64:
                    return (i) -> dictionary.decodeToLong(i);
                case FLOAT:
                    return (i) -> dictionary.decodeToFloat(i);
                case DOUBLE:
                    return (i) -> dictionary.decodeToDouble(i);
                case FIXED_LEN_BYTE_ARRAY:
                case BINARY:
                case INT96:
                    return (i) -> dictionary.decodeToBinary(i);
                default:
                    throw new IllegalArgumentException("Unsupported Parquet primitive type: " + primitiveType.getPrimitiveTypeName());
            }
        }
    }

    /**
     * This class implements methods defined in UserDefinedPredicate based on the page statistic and tuple domain(for a column).
     */
    static class ParquetUserDefinedPredicateTupleDomain<T extends Comparable<T>>
            extends UserDefinedPredicate<T>
            implements Serializable
    {
        private Domain columnDomain;

        ParquetUserDefinedPredicateTupleDomain(Domain domain)
        {
            this.columnDomain = domain;
        }

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Upgrade Presto (or the presto-parquet module) to a version whose TupleDomainParquetPredicate handles the new primitive type.
  2. Add the missing case to the switch in DictionaryValueConverter.getConverter, mapping the new PrimitiveTypeName to an appropriate dictionary decode function.
  3. As a workaround, disable predicate/dictionary statistics pushdown for the affected column (e.g. avoid effectivePredicate pushdown) so getConverter is never called.
  4. Verify which primitive type the file uses with parquet-tools / parquet meta to confirm it is genuinely an unsupported type.

Example fix

// before
default:
    throw new IllegalArgumentException("Unsupported Parquet primitive type: " + primitiveType.getPrimitiveTypeName());

// after
case NEW_PRIMITIVE_TYPE:
    return (i) -> dictionary.decodeToBinary(i); // or the appropriate decoder
default:
    throw new IllegalArgumentException("Unsupported Parquet primitive type: " + primitiveType.getPrimitiveTypeName());
Defensive patterns

Strategy: validation

Validate before calling

// Check the column's primitive type before relying on predicate pushdown
PrimitiveTypeName name = primitiveType.getPrimitiveTypeName();
if (name != PrimitiveTypeName.INT32 && name != PrimitiveTypeName.INT64 &&
    name != PrimitiveTypeName.FLOAT && name != PrimitiveTypeName.DOUBLE &&
    name != PrimitiveTypeName.BINARY && name != PrimitiveTypeName.FIXED_LEN_BYTE_ARRAY &&
    name != PrimitiveTypeName.INT96) {
    // skip dictionary-statistics pushdown for this column
}

Prevention

When it happens

Trigger: getConverter(primitiveType) is invoked while constructing dictionary-page statistics for a column whose PrimitiveType.getPrimitiveTypeName() is not one of the eight handled values — in practice only possible with a newer parquet-mr/parquet-column PrimitiveTypeName enum value or a custom type mapping, since BOOLEAN is the only other enum member and is filtered out earlier.

Common situations: Upgrading parquet-mr to a version that introduces a new primitive type while presto-parquet still ships the old switch; running a Presto build against a file written by a newer writer emitting types this build predates.

Related errors


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