use of io.trino.spi.block.LazyBlock in project trino by trinodb.
the class LazyRecordPageSource method lazyWrapper.
private Page lazyWrapper(Page page) {
Block[] lazyBlocks = new Block[page.getChannelCount()];
for (int i = 0; i < page.getChannelCount(); ++i) {
Block block = page.getBlock(i);
lazyBlocks[i] = new LazyBlock(page.getPositionCount(), () -> block);
}
return new Page(page.getPositionCount(), lazyBlocks);
}
Aggregations