presto-raptor-legacy/src/main/java/io/prestosql/plugin/raptor/legacy/storage/ShardStats.java/ShardStats/doComputeColumnStats
class ShardStats:    private static ColumnStats doComputeColumnStats(OrcReader orcReader, long columnId, Type type, TypeManager typeManager)
            throws IOException
    {
        OrcColumn column = getColumn(orcReader.getRootColumn().getNestedColumns(), columnId);
        Type columnType = toOrcFileType(type, typeManager);
        OrcRecordReader reader = orcReader.createRecordReader(
                ImmutableList.of(column),
                ImmutableList.of(columnType),
                OrcPredicate.TRUE,
                UTC,
                newSimpleAggregatedMemoryContext(),
                INITIAL_BATCH_SIZE,
                exception -> new PrestoException(RAPTOR_ERROR, "Error reading column: " + columnId, exception));

        if (type.equals(BooleanType.BOOLEAN)) {
            return indexBoolean(reader, columnId);
        }
        if (type.equals(BigintType.BIGINT) ||
                type.equals(DateType.DATE) ||
                type.equals(TimestampType.TIMESTAMP)) {
            return indexLong(type, reader, columnId);
        }
        if (type.equals(DoubleType.DOUBLE)) {
            return indexDouble(reader, columnId);
        }
        if (type instanceof VarcharType) {
            return indexString(type, reader, columnId);
        }
        return null;
    }