use of io.trino.orc.metadata.statistics.ShortDecimalStatisticsBuilder 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);
}
use of io.trino.orc.metadata.statistics.ShortDecimalStatisticsBuilder 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();
}
Aggregations