public static Collection<Range> getRangesFromDomain(Optional<Domain> domain, AccumuloRowSerializer serializer)
            throws TableNotFoundException
    {
        // if we have no predicate pushdown, use the full range
        if (!domain.isPresent()) {
            return ImmutableSet.of(new Range());
        }

        ImmutableSet.Builder<Range> rangeBuilder = ImmutableSet.builder();
        for (com.facebook.presto.spi.predicate.Range range : domain.get().getValues().getRanges().getOrderedRanges()) {
            rangeBuilder.add(getRangeFromPrestoRange(range, serializer));
        }

        return rangeBuilder.build();
    }
public static Collection < Range > getRangesFromDomain ( Optional < Domain > domain , AccumuloRowSerializer serializer ) throws TableNotFoundException { if ( ! domain . isPresent ( ) ) { return ImmutableSet . of ( new Range ( ) ) ; } ImmutableSet . Builder < Range > rangeBuilder = ImmutableSet . builder ( ) ; for ( com . facebook . presto . spi . predicate . Range range : domain . get ( ) . getValues ( ) . getRanges ( ) . getOrderedRanges ( ) ) { rangeBuilder . add ( getRangeFromPrestoRange ( range , serializer ) ) ; } return rangeBuilder . build ( ) ; }
Gets a collection of Accumulo Range objects from the given Presto domain.
This maps the column constraints of the given Domain to an Accumulo Range scan.

@param domain Domain, can be null (returns (-inf, +inf) Range)
@param serializer Instance of an {@link AccumuloRowSerializer}
@return A collection of Accumulo Range objects
@throws TableNotFoundException If the Accumulo table is not found