Enum Class AggregateProperty

java.lang.Object
java.lang.Enum<AggregateProperty>
com.darkcollective.relix.function.AggregateProperty
All Implemented Interfaces:
Serializable, Comparable<AggregateProperty>, Constable

public enum AggregateProperty extends Enum<AggregateProperty>
A contract an aggregate makes with the optimizer, in the way FunctionProperty does for scalar functions.

Each constant licenses a rewrite that would otherwise be unsound, so declaring one of an aggregate that does not honour it changes results rather than timings.

  • Enum Constant Details

    • DUPLICATE_INSENSITIVE

      public static final AggregateProperty DUPLICATE_INSENSITIVE
      Feeding the same value twice does not change the result, so a duplicate-removing step below the aggregate can be dropped: MIN and MAX do not care how many times they saw a value, while SUM, AVG, COUNT and COLLECT very much do.
    • ORDER_INSENSITIVE

      public static final AggregateProperty ORDER_INSENSITIVE
      The result does not depend on the order rows arrive in. SUM qualifies; COLLECT, which gathers values into an array in row order, does not, and neither does an ARGMAX whose ties resolve to the first matching row.
  • Method Details

    • values

      public static AggregateProperty[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AggregateProperty valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null