Search in sources :

Example 1 with LongDecimalStatisticsBuilder

use of io.trino.orc.metadata.statistics.LongDecimalStatisticsBuilder in project trino by trinodb.

the class DecimalColumnWriter method finishRowGroup.

@Override
public Map<OrcColumnId, ColumnStatistics> finishRowGroup() {
    checkState(!closed);
    ColumnStatistics statistics;
    if (type.isShort()) {
        statistics = shortDecimalStatisticsBuilder.buildColumnStatistics();
        shortDecimalStatisticsBuilder = new ShortDecimalStatisticsBuilder(type.getScale());
    } else {
        statistics = longDecimalStatisticsBuilder.buildColumnStatistics();
        longDecimalStatisticsBuilder = new LongDecimalStatisticsBuilder();
    }
    rowGroupColumnStatistics.add(statistics);
    return ImmutableMap.of(columnId, statistics);
}
Also used : ColumnStatistics(io.trino.orc.metadata.statistics.ColumnStatistics) LongDecimalStatisticsBuilder(io.trino.orc.metadata.statistics.LongDecimalStatisticsBuilder) ShortDecimalStatisticsBuilder(io.trino.orc.metadata.statistics.ShortDecimalStatisticsBuilder)

Example 2 with LongDecimalStatisticsBuilder

use of io.trino.orc.metadata.statistics.LongDecimalStatisticsBuilder in project trino by trinodb.

the class DecimalColumnWriter method reset.

@Override
public void reset() {
    closed = false;
    dataStream.reset();
    scaleStream.reset();
    presentStream.reset();
    rowGroupColumnStatistics.clear();
    shortDecimalStatisticsBuilder = new ShortDecimalStatisticsBuilder(this.type.getScale());
    longDecimalStatisticsBuilder = new LongDecimalStatisticsBuilder();
}
Also used : LongDecimalStatisticsBuilder(io.trino.orc.metadata.statistics.LongDecimalStatisticsBuilder) ShortDecimalStatisticsBuilder(io.trino.orc.metadata.statistics.ShortDecimalStatisticsBuilder)

Aggregations

LongDecimalStatisticsBuilder (io.trino.orc.metadata.statistics.LongDecimalStatisticsBuilder)2 ShortDecimalStatisticsBuilder (io.trino.orc.metadata.statistics.ShortDecimalStatisticsBuilder)2 ColumnStatistics (io.trino.orc.metadata.statistics.ColumnStatistics)1