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.