Class BucketResolver

    • Constructor Detail

      • BucketResolver

        public BucketResolver()
    • Method Detail

      • push

        public BucketResolver push​(ConstantValue<?> val,
                                   boolean inclusive)
        Pushes the given expression onto this bucket resolver. Once all buckets have been pushed using this method, call resolve(GroupingExpression) to retrieve to combined grouping expression.
        Parameters:
        val - The expression to push.
        inclusive - Whether or not the value is inclusive or not.
        Throws:
        java.lang.IllegalArgumentException - Thrown if the expression is incompatible.
      • resolve

        public PredefinedFunction resolve​(GroupingExpression exp)
        Resolves and returns the list of grouping expressions that correspond to the previously pushed buckets.
        Parameters:
        exp - The expression to assign to the function.
        Returns:
        The list corresponding to the pushed buckets.