in paimon-presto-common/src/main/java/org/apache/paimon/presto/PrestoPageSourceBase.java [145:172]
private Page nextPage() throws IOException {
int count = 0;
long start = System.nanoTime();
try {
while (count < ROWS_PER_REQUEST && !pageBuilder.isFull()) {
if (!iterator.hasNext()) {
isFinished = true;
return returnPage(count);
}
InternalRow row = iterator.next();
pageBuilder.declarePosition();
count++;
for (int i = 0; i < prestoColumnTypes.size(); i++) {
BlockBuilder output = pageBuilder.getBlockBuilder(i);
appendTo(
prestoColumnTypes.get(i),
paimonColumnTypes.get(i),
InternalRowUtils.get(row, i, paimonColumnTypes.get(i)),
output);
}
}
return returnPage(count);
} finally {
readTimeNanos += System.nanoTime() - start;
}
}