prestodb/presto · error · UnsupportedOperationException

In differential_entropy UDF, unsupported arguments for type

Error message

In differential_entropy UDF, unsupported arguments for type: %s

What it means

Default (unsupported) implementation of validateParameters on a differential_entropy state strategy: the concrete strategy variant cannot interpret the given combination of size/sample/weight/min/max arguments, so parameter validation itself is rejected for this strategy type.

Solutions

  1. Supply the full parameter set (bucket size, sample, weight, min, max) that this strategy requires
  2. Choose a strategy/method whose parameter signature matches your call
  3. Check the differential_entropy documentation for per-method required arguments
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at presto-main-base/src/main/java/com/facebook/presto/operator/aggregation/differentialentropy/DifferentialEntropyStateStrategy.java:163 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/167dd38366999404. Report an issue: GitHub.

Appendix: source

Thrown at presto-main-base/src/main/java/com/facebook/presto/operator/aggregation/differentialentropy/DifferentialEntropyStateStrategy.java:163

    void mergeWith(DifferentialEntropyStateStrategy other);

    DifferentialEntropyStateStrategy clone();

    default void validateParameters(long size, double sample, double weight, double min, double max)
    {
        throw new UnsupportedOperationException(
                format("In differential_entropy UDF, unsupported arguments for type: %s", getClass().getSimpleName()));
    }

    default void validateParameters(long size, double sample, double weight)
    {
        throw new UnsupportedOperationException(
                format("In differential_entropy UDF, unsupported arguments for type: %s", getClass().getSimpleName()));
    }

    default void validateParameters(long size, double sample)
    {
        throw new UnsupportedOperationException(
                format("In differential_entropy UDF, unsupported arguments for type: %s", getClass().getSimpleName()));
    }

    static void serialize(DifferentialEntropyStateStrategy strategy, SliceOutput sliceOut)
    {
        sliceOut.appendInt(DifferentialEntropyStateStrategy.class.getSimpleName().hashCode());
        if (strategy == null) {
            sliceOut.appendInt(0);
            return;
        }

        if (strategy instanceof UnweightedReservoirSampleStateStrategy) {
            sliceOut.appendInt(1);
        }
        else if (strategy instanceof WeightedReservoirSampleStateStrategy) {
            sliceOut.appendInt(2);
        }
        else if (strategy instanceof FixedHistogramMleStateStrategy) {

View on GitHub (pinned to 55bb57d202)