Package tilda.enums

Enum AggregateType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<AggregateType>

    public enum AggregateType
    extends java.lang.Enum<AggregateType>
    • Field Detail

      • _DEFAULT_STRING_AGG_SIZE

        public static final java.lang.Integer _DEFAULT_STRING_AGG_SIZE
        For STRING aggregates, we can't reuse the size of the source column, so we set a default here of 10B which hopefully is enough 10MB = 10*1024*1024
      • _windowOnly

        protected final boolean _windowOnly
      • _composable

        protected final boolean _composable
      • _ALIASES

        protected static java.lang.String[][] _ALIASES
      • _AGG_REGEX

        protected static final java.util.regex.Pattern _AGG_REGEX
        Pattern for an aggregate with params, e.g., "abced(param1, ...)".
    • Method Detail

      • values

        public static AggregateType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (AggregateType c : AggregateType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static AggregateType valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • isWindowOnly

        public boolean isWindowOnly()
      • isComposable

        public boolean isComposable()
      • parse

        public static AggregateType parse​(java.lang.String str)
      • parseAttributes

        public static java.lang.String parseAttributes​(java.lang.String aggregateStr)
        Parses an attribute part of an aggregate, for example STRING(','). Minimum syntax check is performed, i.e., checks that there is an open and close parenthesis at the beginning and end, and that what's inside is a standard list of comma-separated parameters
        Parameters:
        aggregateStr -
        Returns:
        null if an error occurred, otherwise, the emoty string if no attributes were found,
      • getType

        public ColumnType getType​(java.lang.String fullColumnName,
                                  ColumnType T,
                                  boolean needsTZ)
      • isCompatible

        public java.lang.String isCompatible​(ViewColumn VC)
      • isCompatible

        public boolean isCompatible​(java.lang.String fullColumnName,
                                    ColumnType type,
                                    boolean needsTZ)
      • getComposedAggregate

        public AggregateType getComposedAggregate()
      • isZonedDateTimeCompatible

        public boolean isZonedDateTimeCompatible()
        Tests whether an aggregate is friendly with DateTime columns. Because DateTime columns have a companion TZ column to maintain the timezone information, aggregates that cannot be ordered essentially are not usable. This method simply wraps isOrderable() in case we later need to make some modifications, i.e., the isTimeZoneCompatible is semantically different enough from isOrderable that we didn't want to alias them.
        Returns:
      • isList

        public boolean isList()
      • areParametersAllowed

        public boolean areParametersAllowed()