Search in sources :

Example 1 with DataPageHeaderV2

use of parquet.format.DataPageHeaderV2 in project presto by prestodb.

the class ParquetColumnChunk method readDataPageV2.

private long readDataPageV2(PageHeader pageHeader, int uncompressedPageSize, int compressedPageSize, List<ParquetDataPage> pages) throws IOException {
    DataPageHeaderV2 dataHeaderV2 = pageHeader.getData_page_header_v2();
    int dataSize = compressedPageSize - dataHeaderV2.getRepetition_levels_byte_length() - dataHeaderV2.getDefinition_levels_byte_length();
    pages.add(new ParquetDataPageV2(dataHeaderV2.getNum_rows(), dataHeaderV2.getNum_nulls(), dataHeaderV2.getNum_values(), getSlice(dataHeaderV2.getRepetition_levels_byte_length()), getSlice(dataHeaderV2.getDefinition_levels_byte_length()), getParquetEncoding(Encoding.valueOf(dataHeaderV2.getEncoding().name())), getSlice(dataSize), uncompressedPageSize, ParquetMetadataReader.readStats(dataHeaderV2.getStatistics(), descriptor.getColumnDescriptor().getType()), dataHeaderV2.isIs_compressed()));
    return dataHeaderV2.getNum_values();
}
Also used : ParquetDataPageV2(com.facebook.presto.hive.parquet.ParquetDataPageV2) DataPageHeaderV2(parquet.format.DataPageHeaderV2)

Aggregations

ParquetDataPageV2 (com.facebook.presto.hive.parquet.ParquetDataPageV2)1 DataPageHeaderV2 (parquet.format.DataPageHeaderV2)1