presto-parquet/src/main/java/io/prestosql/parquet/ParquetEncoding.java/ParquetEncoding/getMaxLevel
class ParquetEncoding:    static int getMaxLevel(ColumnDescriptor descriptor, ValuesType valuesType)
    {
        switch (valuesType) {
            case REPETITION_LEVEL:
                return descriptor.getMaxRepetitionLevel();
            case DEFINITION_LEVEL:
                return descriptor.getMaxDefinitionLevel();
            case VALUES:
                if (descriptor.getPrimitiveType().getPrimitiveTypeName() == BOOLEAN) {
                    return 1;
                }
                // fall-through
            default:
                throw new ParquetDecodingException("Unsupported values type: " + valuesType);
        }
    }