org.apache.parquet.column.values.rle.RunLengthBitPackingHybridDecoder Java Examples

The following examples show how to use org.apache.parquet.column.values.rle.RunLengthBitPackingHybridDecoder. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DictionaryReader.java    From presto with Apache License 2.0 5 votes vote down vote up
@Override
public void initFromPage(int valueCount, ByteBufferInputStream in)
        throws IOException
{
    int bitWidth = BytesUtils.readIntLittleEndianOnOneByte(in);
    decoder = new RunLengthBitPackingHybridDecoder(bitWidth, in);
}
 
Example #2
Source File: PrimitiveColumnReader.java    From presto with Apache License 2.0 5 votes vote down vote up
private LevelReader buildLevelRLEReader(int maxLevel, Slice slice)
{
    if (maxLevel == 0) {
        return new LevelNullReader();
    }
    return new LevelRLEReader(new RunLengthBitPackingHybridDecoder(BytesUtils.getWidthFromMaxInt(maxLevel), slice.getInput()));
}
 
Example #3
Source File: BasePageIterator.java    From iceberg with Apache License 2.0 5 votes vote down vote up
IntIterator newRLEIterator(int maxLevel, BytesInput bytes) {
  try {
    if (maxLevel == 0) {
      return new PageIterator.NullIntIterator();
    }
    return new RLEIntIterator(
        new RunLengthBitPackingHybridDecoder(
            BytesUtils.getWidthFromMaxInt(maxLevel),
            bytes.toInputStream()));
  } catch (IOException e) {
    throw new ParquetDecodingException("could not read levels in page for col " + desc, e);
  }
}
 
Example #4
Source File: PageIterator.java    From iceberg with Apache License 2.0 5 votes vote down vote up
private IntIterator newRLEIterator(int maxLevel, BytesInput bytes) {
  try {
    if (maxLevel == 0) {
      return new NullIntIterator();
    }
    return new RLEIntIterator(
        new RunLengthBitPackingHybridDecoder(
            BytesUtils.getWidthFromMaxInt(maxLevel),
            bytes.toInputStream()));
  } catch (IOException e) {
    throw new ParquetDecodingException("could not read levels in page for col " + desc, e);
  }
}
 
Example #5
Source File: ColumnReaderBase.java    From parquet-mr with Apache License 2.0 5 votes vote down vote up
private IntIterator newRLEIterator(int maxLevel, BytesInput bytes) {
  try {
    if (maxLevel == 0) {
      return new NullIntIterator();
    }
    return new RLEIntIterator(
        new RunLengthBitPackingHybridDecoder(
            BytesUtils.getWidthFromMaxInt(maxLevel),
            bytes.toInputStream()));
  } catch (IOException e) {
    throw new ParquetDecodingException("could not read levels in page for col " + path, e);
  }
}
 
Example #6
Source File: LevelRLEReader.java    From presto with Apache License 2.0 4 votes vote down vote up
public LevelRLEReader(RunLengthBitPackingHybridDecoder delegate)
{
    this.delegate = delegate;
}
 
Example #7
Source File: BasePageIterator.java    From iceberg with Apache License 2.0 4 votes vote down vote up
RLEIntIterator(RunLengthBitPackingHybridDecoder delegate) {
  this.delegate = delegate;
}
 
Example #8
Source File: PageIterator.java    From iceberg with Apache License 2.0 4 votes vote down vote up
RLEIntIterator(RunLengthBitPackingHybridDecoder delegate) {
  this.delegate = delegate;
}
 
Example #9
Source File: ColumnReaderBase.java    From parquet-mr with Apache License 2.0 4 votes vote down vote up
public RLEIntIterator(RunLengthBitPackingHybridDecoder delegate) {
  this.delegate = delegate;
}