Class AggSpecApproximatePercentile

java.lang.Object
io.deephaven.api.agg.spec.AggSpecBase
io.deephaven.api.agg.spec.AggSpecApproximatePercentile
All Implemented Interfaces:
AggSpec

@Immutable public abstract class AggSpecApproximatePercentile extends AggSpecBase
Specifies an aggregation that outputs a percentile approximated using a T-Digest with the specified compression().

Efficiently supports multiple output percentiles based on a single input column.

May only be used on static or add-only tables.

Only supported for numeric types.

  • Constructor Details

    • AggSpecApproximatePercentile

      public AggSpecApproximatePercentile()
  • Method Details

    • of

      public static AggSpecApproximatePercentile of(double percentile)
      Create a new AggSpecApproximatePercentile with compression chosen by the server.
      Parameters:
      percentile - the percentile
      Returns:
      the agg spec
    • of

      public static AggSpecApproximatePercentile of(double percentile, double compression)
      Create a new AggSpecApproximatePercentile.
      Parameters:
      percentile - the percentile
      compression - the compression
      Returns:
      the agg spec
    • description

      public final String description()
      Description copied from interface: AggSpec
      Get a simple description for this AggSpec.
      Returns:
      The description
    • percentile

      public abstract double percentile()
      Percentile. Must be in range [0.0, 1.0].
      Returns:
      The percentile
    • compression

      public abstract OptionalDouble compression()
      T-Digest compression factor. Must be greater than or equal to 1. 1000 is extremely large.

      When not specified, the engine will choose a compression value.

      Returns:
      The T-Digest compression factor if specified
    • walk

      public final <V extends AggSpec.Visitor> V walk(V visitor)
      Description copied from interface: AggSpec
      Glue method to deliver this AggSpec to a AggSpec.Visitor.
      Parameters:
      visitor - The visitor
      Returns:
      The visitor