presto-orc/src/main/java/io/prestosql/orc/OrcWriterStats.java/OrcWriterStats/getFlushStats
class OrcWriterStats:    private OrcWriterFlushStats getFlushStats(FlushReason flushReason)
    {
        switch (flushReason) {
            case MAX_ROWS:
                return maxRowsFlush;
            case MAX_BYTES:
                return maxBytesFlush;
            case DICTIONARY_FULL:
                return dictionaryFullFlush;
            case CLOSED:
                return closedFlush;
            default:
                throw new IllegalArgumentException("unknown flush reason " + flushReason);
        }
    }