Search in sources :

Example 1 with FlatDecoders

use of com.facebook.presto.parquet.batchreader.decoders.Decoders.FlatDecoders in project presto by prestodb.

the class BinaryFlatBatchReader method readNextPage.

protected boolean readNextPage() {
    definitionLevelDecoder = null;
    valuesDecoder = null;
    remainingCountInPage = 0;
    DataPage page = pageReader.readPage();
    if (page == null) {
        return false;
    }
    FlatDecoders flatDecoders = readFlatPage(page, columnDescriptor, dictionary);
    definitionLevelDecoder = flatDecoders.getDefinitionLevelDecoder();
    valuesDecoder = (BinaryValuesDecoder) flatDecoders.getValuesDecoder();
    remainingCountInPage = page.getValueCount();
    return true;
}
Also used : DataPage(com.facebook.presto.parquet.DataPage) FlatDecoders(com.facebook.presto.parquet.batchreader.decoders.Decoders.FlatDecoders)

Example 2 with FlatDecoders

use of com.facebook.presto.parquet.batchreader.decoders.Decoders.FlatDecoders in project presto by prestodb.

the class Int32FlatBatchReader method readNextPage.

protected boolean readNextPage() {
    definitionLevelDecoder = null;
    valuesDecoder = null;
    remainingCountInPage = 0;
    DataPage page = pageReader.readPage();
    if (page == null) {
        return false;
    }
    FlatDecoders flatDecoders = readFlatPage(page, columnDescriptor, dictionary);
    definitionLevelDecoder = flatDecoders.getDefinitionLevelDecoder();
    valuesDecoder = (Int32ValuesDecoder) flatDecoders.getValuesDecoder();
    remainingCountInPage = page.getValueCount();
    return true;
}
Also used : DataPage(com.facebook.presto.parquet.DataPage) FlatDecoders(com.facebook.presto.parquet.batchreader.decoders.Decoders.FlatDecoders)

Aggregations

DataPage (com.facebook.presto.parquet.DataPage)2 FlatDecoders (com.facebook.presto.parquet.batchreader.decoders.Decoders.FlatDecoders)2