Search in sources :

Example 1 with OrcSelectiveRowDataCacheKey

use of io.prestosql.orc.OrcSelectiveRowDataCacheKey in project hetu-core by openlookeng.

the class ResultCachingSelectiveColumnReader method startRowGroup.

@Override
public void startRowGroup(InputStreamSources dataStreamSources) throws IOException {
    this.offset = 0;
    this.readSize = 0;
    StreamSourceMeta streamSourceMeta = dataStreamSources.getStreamSourceMeta();
    orcDataSourceId = streamSourceMeta.getDataSourceId();
    lastModifiedTime = streamSourceMeta.getLastModifiedTime();
    stripeOffset = streamSourceMeta.getStripeOffset();
    rowGroupOffset = streamSourceMeta.getRowGroupOffset();
    OrcSelectiveRowDataCacheKey newCachKey = new OrcSelectiveRowDataCacheKey();
    newCachKey.setOrcDataSourceId(new OrcDataSourceIdWithTimeStamp(orcDataSourceId, lastModifiedTime));
    newCachKey.setStripeOffset(streamSourceMeta.getStripeOffset());
    newCachKey.setRowGroupOffset(streamSourceMeta.getRowGroupOffset());
    newCachKey.setColumnId(column.getColumnId());
    newCachKey.setPredicate(predicate);
    cachedBlock = cacheAccumulated(newCachKey);
    // reset the stream - may not be required at all
    delegate.startRowGroup(dataStreamSources);
}
Also used : OrcDataSourceIdWithTimeStamp(io.prestosql.orc.OrcDataSourceIdWithTimeStamp) OrcSelectiveRowDataCacheKey(io.prestosql.orc.OrcSelectiveRowDataCacheKey) StreamSourceMeta(io.prestosql.orc.stream.StreamSourceMeta)

Aggregations

OrcDataSourceIdWithTimeStamp (io.prestosql.orc.OrcDataSourceIdWithTimeStamp)1 OrcSelectiveRowDataCacheKey (io.prestosql.orc.OrcSelectiveRowDataCacheKey)1 StreamSourceMeta (io.prestosql.orc.stream.StreamSourceMeta)1