@NotThreadSafe public class MergingPageOutput extends Object
As long as the input page contains more than minRowCount rows
or is bigger than minPageSizeInBytes it is returned as is without
additional memory copy.
The page data that has been buffered so far before receiving a "big" page is being flushed before transferring a "big" page.
Although it is still possible that the MergingPageOutput may return a tiny page,
this situation is considered to be rare due to the assumption that filter selectivity may not
vary a lot based on the particular input page.
Considering the CPU time required to process(filter, project) a full (~1MB) page returned by a connector, the CPU cost of memory copying (< 50kb, < 1024 rows) is supposed to be negligible.
| Constructor and Description |
|---|
MergingPageOutput(Iterable<? extends Type> types,
long minPageSizeInBytes,
int minRowCount) |
MergingPageOutput(Iterable<? extends Type> types,
long minPageSizeInBytes,
int minRowCount,
int maxPageSizeInBytes) |
| Modifier and Type | Method and Description |
|---|---|
void |
addInput(Iterator<Optional<Page>> input) |
void |
finish() |
Page |
getOutput() |
long |
getRetainedSizeInBytes() |
boolean |
isFinished() |
boolean |
needsInput() |
Copyright © 2012–2019. All rights reserved.