Search in sources :

Example 1 with StringColumnStatistics

use of com.facebook.presto.orc.metadata.statistics.StringColumnStatistics in project presto by prestodb.

the class TestTupleDomainOrcPredicate method stringColumnStats.

private static ColumnStatistics stringColumnStats(Long numberOfValues, String minimum, String maximum) {
    Slice minimumSlice = minimum == null ? null : utf8Slice(minimum);
    Slice maximumSlice = maximum == null ? null : utf8Slice(maximum);
    // sum and minAverageValueSizeInBytes are not used in this test; they could be arbitrary numbers
    return new StringColumnStatistics(numberOfValues, null, new StringStatistics(minimumSlice, maximumSlice, 100L));
}
Also used : StringStatistics(com.facebook.presto.orc.metadata.statistics.StringStatistics) StringColumnStatistics(com.facebook.presto.orc.metadata.statistics.StringColumnStatistics) Slice(io.airlift.slice.Slice) Slices.utf8Slice(io.airlift.slice.Slices.utf8Slice)

Aggregations

StringColumnStatistics (com.facebook.presto.orc.metadata.statistics.StringColumnStatistics)1 StringStatistics (com.facebook.presto.orc.metadata.statistics.StringStatistics)1 Slice (io.airlift.slice.Slice)1 Slices.utf8Slice (io.airlift.slice.Slices.utf8Slice)1